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
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to