From: Takashi Iwai Subject: Re: Third time: Unlink PCM resource ? Date: Mon, 25 May 2009 20:38:50 +0200 Message-ID: References: <4A1AB98B.9010604@yellowcouch.org> <4A1ADAEF.3070803@yellowcouch.org> <4A1AE302.8080702@yellowcouch.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 3013A244AD for ; Mon, 25 May 2009 20:38:50 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Jaroslav Kysela Cc: "alsa-devel@alsa-project.org" , Werner Van Belle List-Id: alsa-devel@alsa-project.org At Mon, 25 May 2009 20:31:42 +0200 (CEST), Jaroslav Kysela wrote: > > On Mon, 25 May 2009, Werner Van Belle wrote: > > > Takashi Iwai wrote: > >> You can control it via fcntl(). See fcntl(2) man page. > >> > > I looked at that but I didn't find any place in alsalib (or libalsa > > whatever the order of those two words), where I can obtain the file > > handle. They are all of type pcm_something_t. I found a file handle > > quite deep in this library but there seems no way to actually obtain > > that handle. > > > > Do you think fcntl on a pcm_t device would work (if we got it to compile > > first :-) > > snd_pcm_poll_descriptors / snd_pcm_poll_descriptors_count ... which doesn't return always all used fd's. > But I wonder why snd_pcm_close() does not work in child process. Could you > show us 'strace -f -e trace=open,close' for your program? Passing O_CLOEXEC would be the best solution, I think. We just need a few additions. Takashi