Starting a daemon (was: ... on a SVR3)

Heiko Blume src at scuzzy.in-berlin.de
Thu Jan 10 11:08:22 AEST 1991


gwc at root.co.uk (Geoff Clare) writes:
>This code assumes that there is always a finite limit on the number of
>open file descriptors per process.  On systems where there is no limit the
>sysconf() call will return -1, and no file descriptors will be closed.

very interesting! i still try to get my hands on the POSIX standard,
until now i couldn't get it anywhere, including my universities CS
library (what a shame :-().
can someone tell me just where i can get it from (i'm in germany, sigh...)

>Unfortunately POSIX doesn't provide any means of finding out the highest
>open fd number, so there is no really robust way of handling this situation.
>The best I can come up with is to close all descriptors up to some arbitrary
>high number (e.g. 256).

jesus...
-- 
      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