[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_installinit

On Sun, Nov 11, 2007 at 09:25:11PM +0100, Arthur de Jong wrote:

> On Sun, 2007-11-11 at 11:04 +0100, Vincent Danjean wrote:
> > When these mechanisms will be ready, a deamon will be unable to close
> > all its file descriptors (unless it closes the whole range of fd
> > (0--2^16 ?) or unless an application can get a list of its open fds).

> This seems to be quite common code (from one of my packages (cvsd),
> don't know what the original source for this code was):

>   m=sysconf(_SC_OPEN_MAX);
>   for (i=0;i<m;i++)
>     close(i);

> There are hurd packages for this package so that should also work.

I wouldn't be so quick to assume that sysconf(_SC_OPEN_MAX) does anything
useful on Hurd at runtime.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/

Reply to: