j...@wxcvbn.org (Jeremie Courreges-Anglas) writes:
> Simple idiom: always initialize the pre-opened fd to -1, and within
> rdaemon() test whether the passed fd is valid.
>
> ok?
Updated diff after Theo suggested avoiding the fcntl call if possible.
Index: usr.sbin/rtadvd/rtadvd.c
==
Simple idiom: always initialize the pre-opened fd to -1, and within
rdaemon() test whether the passed fd is valid.
ok?
Index: usr.sbin/dhcrelay/dhcrelay.c
===
RCS file: /cvs/src/usr.sbin/dhcrelay/dhcrelay.c,v
retrieving revision 1.