[systemd-devel] sd_listen_fds: find file descriptor
Michael D. Berger
m.d.berger at ieee.org
Wed Dec 14 10:28:45 PST 2011
I quote the man page:
Otherwise the number of file descriptors passed is returned. The
application may find them starting with file descriptor
SD_LISTEN_FDS_START, i.e. file descriptor 3
For example, assume sd_listen_fds returns 5. Then I do somethiing like:
int jj = 3;
for (; jj < 8; ++jj)
if (<sd_is_socket_inet says it is the right thing>)
break;
if (jj < 8)
<jj is a good handle>
Right? If not, then what?
Thanks,
Mike.
--
Michael D. Berger
m.d.berger at ieee.org
http://www.rosemike.net/
More information about the systemd-devel
mailing list