Re:I've Just Liberated My Modules
by smsm42 on Tuesday March 22, 2016 @11:18PM
(#11341887)
I wonder how long /usr/bin/true source is.
[ Parent
| on HN ]
Longer than one might think...
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true...
On Linux, it's 30ish lines, with half of those there to make false.c able to reuse some code. (I know, it's stupid.)
In OpenBSD, it's 3 LoC IIRC.
On at least one OS I worked with, it was 0 bytes long because /bin/sh on an empty file returns true. (I think that was IRIX 4.x.) OTOH, that's slower than the executable from a 3 LoC do-nothing program.