On Fri, Jan 11, 2002 at 04:49:19PM +0000, Mark Brown wrote: > On Fri, Jan 11, 2002 at 10:34:18AM -0600, Steve Greenland wrote: > > > You can't, in general, close *all* open file descriptors. OPEN_MAX > > may not exist (and I would guess that it doesn't on the HURD). It's > > completely reasonable for a daemon to that doesn't open any extras to > > assume that only stdin, stdout, and stderr are open. > > If OPEN_MAX is undefined you could always use INT_MAX :-) .
iirc, there has been a problem with a program closing all descriptors before, because they were used by libc (?) for something. So no, you shouldn't use INT_MAX either :) -- Adam Olsen, aka Rhamphoryncus