Starting a daemon on a SVR3
Heiko Blume
src at scuzzy.in-berlin.de
Fri Jan 4 00:21:49 AEST 1991
jky at 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 "<sys/param.h>" 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 at 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
More information about the Comp.unix.questions
mailing list