Re: [LineControl-development] linesrv doesn't close standard file descriptors
Brought to you by:
sfuchs
|
From: Daniel R. <da...@ro...> - 2003-12-19 00:09:38
|
Jonathan Rogers <jo...@te...> [2003-12-18/15:58]:
> I have attached a patch against linesrv-2.1.18 which removes a
> redundant call to fork and attaches all three standard file
> descriptors to "/dev/null", which seems to be the right thing to do,
> since it is what other daemons do.
The second fork seems to have been there for a good reason: some systems
allegedly require it in order to make sure the daemon process is not
associated with a TTY. Bottom line: needs some research before removal.
I have committed a modified and commented version of the patch to CVS
HEAD in linesrv-2.1. It works for me. I have not touched linesrv-3, as
the code in question is triplicated (well, duplicated twice, so code is
in 3 places) and needs to be cleaned up before thinking about doing
"proper" daemonizing.
It seems that the Really Right Thing to do will be to call the daemon(3)
syscall on systems where it is available, instead of doing all the
daemonizing ourselves (and possibly screwing up).
> This should address a bug report which has been open for more than a
> year
I am not tracker-admin, I cannot officially resolve this tracker item.
Stefan?
Cheers,
Dan
--=20
Daniel Roethlisberger <da...@ro...>
OpenPGP key id 0x804A06B1 (1024/4096 DSA/ElGamal)
144D 6A5E 0C88 E5D7 0775 FCFD 3974 0E98 804A 06B1
!->
|