Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!opal!tmpmbx!scuzzy!src From: src@scuzzy.in-berlin.de (Heiko Blume) Newsgroups: comp.unix.questions Subject: Re: Starting a daemon on a SVR3 Message-ID: <1991Jan03.132149.3565@scuzzy.in-berlin.de> Date: 3 Jan 91 13:21:49 GMT References: <25360@adm.brl.mil> <1752@dschub.dsc.com> Organization: Contributed Software Lines: 20 jky@neptune.dsc.com (Jacob Kan Yu) writes: >What's about this: > for ( i = 0 ; i < NOFILE ; i++ ) > close( i ); >The problem I have is that "NOFILE" is 20 for System V/386 Release 3.0 and is >60 for Release 3.2 and the comments in "" says this number is >no longer a constant and should be removed in the next release. Anybody >have better idea? yes [if you have posix stuff]: for ( i = 0 ; i < sysconf(_SC_OPEN_MAX) ; i++ ) close( i ); -- Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 public source archive [HST V.42bis]: scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp uucp scuzzy!/src/README /your/home