Bruce Evans <b...@optusnet.com.au> writes: > The above is missing purging of stdout and stderr. Someone may have > freopen()ed these in "rw" mode.
If you did that, you're on your own... :) I didn't notice that fpurge() is actually a superset of fflush(). > Callers of daemon() shouldn't do this, > but if fpurge(NULL) worked right then it would be easy to purge stdout > and stderr when purging stdin and all other streams (if this is what > we want to do). I agree that fpurge(NULL) would be nice, but nothing outside the base system would use it, since it wouldn't work on older or non-FreeBSD systems - and I don't mean "wouldn't work" as in "would have no effect whatsoever", I mean "wouldn't work" as in "immediate SIGSEGV" since our fpurge() does not check for fp == NULL. DES -- Dag-Erling Smørgrav - d...@des.no _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"