[Pkg-stud-maintainers] Bug#725797: Bug#725797: stud: Fix failure to run stud restart

Vincent Bernat bernat at debian.org
Sat Oct 12 08:07:27 UTC 2013


 ❦ 12 octobre 2013 09:15 CEST, Louis Bouchard <louis.bouchard at canonical.com> :

>> It has been some time since I run stud. I just tried and I notice
>> that I have a parent process that is supervising childrens and
>> restarting them when they die. And the PID registered works as
>> expected:
>>
>> ├─stud(3933)─┬─stud(3950) │            ├─stud(3951) │
>> ├─stud(3952) │            └─stud(3953)
>>
>> $ cat /var/run/stud.take1.conf.pid 3933
>>
>> I don't understand why this is not your case.
>>
>
> It is my case; there is a PID file for each stud configuration
> started. The problem is that, when using --pidfile option,
> start-stop-daemon only sends the TERM signal to the parent process
> then returns. This happens fast enough for the do_start to be executed
> before the children processes have time to terminate.

OK, sorry, I didn't understand that the first time. Since the other way
to kill stud does not play nice with the multiple instance feature, what
about put a "sleep 1" between stop and start? This is unfortunate and
may somewhat break but this is still often done.

Other solutions would be to provide Upstart/systemd scripts or to modify
stud to wait for its children before terminating. I can do a patch for
the later.
-- 
 /*
  * We used to try various strange things. Let's not.
  */
	2.2.16 /usr/src/linux/fs/buffer.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-stud-maintainers/attachments/20131012/bfdbf739/attachment.sig>


More information about the Pkg-stud-maintainers mailing list