From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Build-in mixer Date: Wed, 15 Oct 2003 17:31:49 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200310151453.h9FErp5f001376@oud> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Paul Davis Cc: Dan Tihelka , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 15 Oct 2003 17:01:07 +0200, I wrote: > > At Wed, 15 Oct 2003 10:53:51 -0400, > Paul Davis wrote: > > > > >it's not related with threads, but it invokes a fork for a server > > >process (a main control only, doesn't do mixing stuffs). > > >it looks like there is something wrong with this together with xmms. > > >i've seen that Xlib got a spurious async. > > >magically enough, the attached patch seems to fix. > > > > >From http://www.gtk.org/faq/#AEN477 > > > > ---------------------------------------------------------------------- > > 5.5. Why does this strange 'x io error' occur when I fork() in my GTK+ app? > > Why does this strange 'x io error' occur when I fork() in my GTK+ app? > > > > This is not really a GTK+ problem, and the problem is not related to > > fork() either. If the 'x io error' occurs then you probably use the > > exit() function in order to exit from the child process. > > > > When GDK opens an X display, it creates a socket file descriptor. When > > you use the exit() function, you implicitly close all the open file > > descriptors, and the underlying X library really doesn't like this. > > > > The right function to use here is _exit(). > > oh yeah, that's it. replacing two exit() calls in pcm_direct.c with > _exit() fixes the problem indeed. also, don't close() in the beginning of server_job(). but there should be better way to handle such a case. Takashi ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php