Anyone have a problem w/ closing fd's in daemonize
Alex Kiernan
alexk at demon.net
Tue Aug 27 07:45:35 UTC 2002
On Fri, 2002-08-23 at 16:24, Russ Allbery wrote:
>
> Alex Kiernan <alexk at demon.net> writes:
>
> > + if ((fd = open("/dev/null", O_RDWR, 0)) != -1) {
>
> Better to separate this into:
>
> fd = open("/dev/null", O_RDWR, 0);
> if (fd != -1) {
>
> It's a bit easier to read. (I should add something about this to the
> style section of HACKING, since lots of existing INN code doesn't do
> this.)
>
Yeah, I hate that idiom too... comes from stealing code from somewhere
else!
--
Alex Kiernan, Principal Engineer, Development, THUS plc
More information about the inn-workers
mailing list