Re: [LAD] [Jack-Devel] A picture...of the global mess

From: Jack O'Quin <jack.oquin@email-addr-hidden>
Date: Thu May 21 2009 - 06:15:54 EEST

On Wed, May 20, 2009 at 04:43:33PM -0500, Jack O'Quin wrote:
> Don't forget a timeout in case the fork/exec fails and there is no message.

>> On Wed, May 20, 2009 at 2:38 PM, Fons Adriaensen <fons@email-addr-hidden> wrote:
>
> The fork/exec is done by jackcontrol, if it fails then
> jackcontrol reports this and the entire jack_client_open()
> is made to fail.

Yes, that's the way one would like it to work. But the real situation
is a bit more complicated (see the start_server function in
libjack/client.c).

First, note that since exec() is called in the child process, there is
no failure code returned in the parent (i.e. client) process address
space. Second, there are actually two fork() calls. That ensures
that any zombie proc structure created on exit from jackd will
automatically be cleaned up by the init process. That avoids
depending on the client to call wait(), which it would not know it
needed to do.

-- 
 joq
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Thu May 21 08:15:02 2009

This archive was generated by hypermail 2.1.8 : Thu May 21 2009 - 08:15:02 EEST