3 ms·
Let us journey back in time, to the year 1995. (Technically 1.03 is from 1998, but I'm sure that functions for passing fd's appear in every version.) qmail-1.
by gwu78 13y ago
Let us journey back in time, to the year 1995. (Technically 1.03 is from 1998, but I'm sure that functions for passing fd's appear in every version.)
qmail-1.03:
fd.h
fd_copy.c
fd_copy.3
fd_move.c
fd_move.3
You could find similar functions in other programs by the same author, e.g., ucspi-tcp, daemontools, etc.
I prefer time-tested, secure code from 1995 to the things you tend to find on Github because this 1990's code is highly portable. It still compiles cleanly 18 years later and is not just tested on one or two systems, e.g., Linux and OSX.
But I'm glad this made the front page. No web browser needed. No installed scripting languages necessary. A single .c file. If only there were more like this on Github.