Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!ira.uka.de!fauern!opal!tmpmbx!scuzzy!src From: src@scuzzy.in-berlin.de (Heiko Blume) Newsgroups: comp.unix.questions Subject: Re: Starting a daemon (was: ... on a SVR3) Message-ID: <1991Jan10.000822.17227@scuzzy.in-berlin.de> Date: 10 Jan 91 00:08:22 GMT References: <25360@adm.brl.mil> <1752@dschub.dsc.com> <1991Jan03.132149.3565@scuzzy.in-berlin.de> <2570@root44.co.uk> Organization: Contributed Software Lines: 21 gwc@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@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