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

PrevNext  Index
DateWed, 20 May 2009 22:15:54 -0500
From Jack O'Quin <[hidden] at gmail dot com>
ToFons Adriaensen <[hidden] at kokkinizita dot net>
CcJack devel <[hidden] at lists dot jackaudio dot org>, Linux Audio Developers <[hidden] at lists dot linuxaudio dot org>
In-Reply-ToFons Adriaensen Re: [LAD] [Jack-Devel] A picture...of the global mess
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 <[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
PrevNext  Index

1242875773.21586_0.ltw:2,a <a075431a0905202015o2f1e575cwcb724f8d7de2d3cf at mail dot gmail dot com>