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

Jack O'Quin jack.oquin at gmail.com
Thu May 21 03:15:54 UTC 2009


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 at kokkinizita.net> 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



More information about the Linux-audio-dev mailing list