From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 26 23:43:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96AA5106568E for ; Fri, 26 Sep 2008 23:43:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outT.internet-mail-service.net (outt.internet-mail-service.net [216.240.47.243]) by mx1.freebsd.org (Postfix) with ESMTP id 74A4D8FC27 for ; Fri, 26 Sep 2008 23:43:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A561624B8; Fri, 26 Sep 2008 16:43:38 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id BBAB42D6014; Fri, 26 Sep 2008 16:43:37 -0700 (PDT) Message-ID: <48DD73A9.5000505@elischer.org> Date: Fri, 26 Sep 2008 16:43:37 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: xorquewasp@googlemail.com References: <20080926222711.GA74003@logik.internal.network> In-Reply-To: <20080926222711.GA74003@logik.internal.network> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: popen() in multithreaded program - hangs? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2008 23:43:38 -0000 xorquewasp@googlemail.com wrote: > I'm trying to write a client for the jack audio connection kit > (http://jackaudio.org), have hit an apparent bug and am not sure what revision of FreeBSD? > who's at fault. > > This is the client: > > -- > > #include > #include > > jack_port_t *input_port; > jack_port_t *output_port; > jack_client_t *client; > > int > main (void) > { > jack_status_t status; > > client = jack_client_open ("cdemo", JackNoStartServer, &status, "default"); > if (!client) errx (112, "client_open: could not"); > > jack_client_close (client); > return 0; > } > > -- > > The jack_client_open() call never returns and the process can only be killed > with SIGKILL. Tracing execution in gdb shows that the hang occurs in the > popen() call in jack_get_tmpdir(), defined at client.c:114: > > http://trac.jackaudio.org/browser/trunk/jack/libjack/client.c > > Is there a known issue with calling popen() in a multithreaded program? At > the point of that call, on my system, there are three running threads. > > Any help/advice on how to resolve this problem would be appreciated. > > xw > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"