[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: rpm leaks an fd in install/erase scripts
- From: Enrico Scholz <enrico scholz informatik tu-chemnitz de>
- To: rpm-list redhat com
- Subject: Re: rpm leaks an fd in install/erase scripts
- Date: Fri, 01 Aug 2003 18:31:15 +0200
jbj@redhat.com (Jeff Johnson) writes:
>> > You are correct, sshd (and all processes claiming to be daemons)
>> > should run through open fd's and close them.
>>
>> True for fd 0-2, but should not be done generally. E.g. djb's fghack
>> from his daemontools will not work when sshd closes all descriptors.
>
> Hmmm, I seem to see the letter h-a-c-k there, but mebbe it's just me.
Yes; it is a hack to deal with daemons which do not support modern
init-concepts. See http://cr.yp.to/daemontools/faq/create.html#fghack
There are other approaches (e.g. Felix von Leitner's 'pidfilehack')
which are using the information from /var/run/sshd.pid to attach the
sshd-daemon to init; but they are consisting of the letters h-a-c-k
also.
>> (ok; the right way would be to convince sshd people to add a
>> '--operate-normally-but-do-not-go-into-background' option).
>
> Now you're starting to make sense. Might even be there, -d for daemons
> often avoids the fork/daemonize which is painful to debug.
Indeed, sshd does not go into background when using it. Unfortunately,
'-d' means 'debug' which can have negative sideeffects (e.g. cluttering
output, superfluous sanity checks for internal operations).
Enrico
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]