can upstart expect/respawn be used on processes that fork more than twice?
Posted
by
johnjamesmiller
on Stack Overflow
See other posts from Stack Overflow
or by johnjamesmiller
Published on 2012-08-30T15:18:52Z
Indexed on
2012/10/20
5:03 UTC
Read the original article
Hit count: 110
I am using upstart to start/stop/automatically restart daemons. One of the daemons forks 4 times. The upstart cookbook states that it only supports forking twice. Is there a workaround?
how it fails
If I try to use expect daemon
or expect fork
upstart uses the pid of the second fork. When I try to stop the job nobody responds to upstarts SIGKILL signal and it hangs until you exhaust the pid space and loop back around. It gets worse if you add respawn. Upstart thinks the job died and immediately starts another one.
bug acknowledged by upstream
A bug has been entered for upstart. The solutions presented are stick with the old sysvinit, rewrite your daemon, or wait for a re-write. rhel is close to 2 years behind the latest upstart package so by the time the rewrite is released and we get updated the wait will probably be 4 years. The daemon is written by a subcontractor of a subcontractor of a contractor so it will not be fixed any time soon either.
© Stack Overflow or respective owner