[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#796608: espeakup: diff for NMU version 1:0.71-27.1



On Sun, 3 Jul 2016 17:55:42 -0300 Felipe Sateler <fsateler@debian.org>
wrote:
> On 3 July 2016 at 16:44, Samuel Thibault <sthibault@debian.org> wrote:
> > Felipe Sateler, on Sun 03 Jul 2016 17:38:58 -0300, wrote:
> >> On 3 July 2016 at 16:33, Samuel Thibault <sthibault@debian.org> wrote:
> >> > Felipe Sateler, on Sun 03 Jul 2016 17:31:14 -0300, wrote:
> >> >> I think the daemonization needs to move later as well:
> >> >
> >> > Why?
> >>
> >> Because the usual protocol is "fork when ready".
> >
> > ? I would rather expect it to be "parent exits when ready".
> 
> Indeed. But using daemon(3), "fork" and "parent exit" time are the same.


Right. I think this is the problem. Afair, systemd will try to read the
pid file as soon as the parent exits. That should happen *after* the
forked daemon process is ready and has written the pid file.

See man daemon(7). This looks like a genuine bug in espeakup to me, and
not something which we can workaround in systemd.

Note also this comment in man daemon(7):

 "The BSD daemon() function should not be used, as it implements only a
  subset of these steps."

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: