Ticket #125 (closed enhancement: invalid)
Opened 21 months ago
Last modified 21 months ago
timeout for start-stop-daemon --start
Reported by: | Ulrich Müller <ulm@gentoo.org> | Owned by: | roy |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | rc | Version: | |
Keywords: | Cc: |
Description
Following problem: A daemon is supposed to detach by itself, but fails to do so in some cases. (It is started with --user and a bad user's configuration may prevent the parent from exiting.) In this situation start-stop-daemon will hang, waiting for the parent to terminate. Which is not nice if it happens at boot time.
With --background it doesn't hang, but with rc_start_wait it will complain that it caught an interrupt if the daemon successfully detaches. And if the daemon doesn't detach, then it will be non-functional and this is not detected. (And I believe --background isn't meant for this case.)
Proposed solution: Add a timeout to --start. If the daemon hasn't detached after the time has passed, stop it.
Change History
comment:1 in reply to: ↑ description Changed 21 months ago by anonymous
- Status changed from new to closed
- Resolution set to invalid
I've done some local tests, and it turns out that this wouldn't solve the problem. And (as discussed on IRC) this kind of issues can be handled by a wrapper script.
So I withdraw my proposal.