[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 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.

>
>> > Opening the sound card before forking doesn't look like a good idea to
>> > me.
>>
>> Why would it be bad?
>
> Because then you have two processes which hold a file descriptor on the
> sound card, one will close it, and you never know what the driver would
> be doing.

That seems a valid concern.

>
>> Eg, pulseaudio opens the sound card before forking as well.
>
> Is it really?  That doesn't sound really safe to me.

And indeed, I was wrong. I now rechecked and indeed it first forks and
then loads the device modules. But the parent waits for the child to
be done before exiting. Which appears to be impossible with daemon(3).

-- 

Saludos,
Felipe Sateler


Reply to: