3 ms·
As mentioned in the article: " This can be done with an empty file that's marked executable, and that's what it was in the earliest unix system libraries. "
by cat199 9y ago
As mentioned in the article:
"
This can be done with an empty file that's marked executable, and that's what it was in the earliest unix system libraries.
"
$ uname -sr
OpenBSD 6.1
$ install -m 755 /dev/null /tmp/muhtrue && /tmp/muhtrue && echo yup
yup
not sure why it was ever switched..
probably the 'return 0;' version is cheaper than a shell fork? hmm..