At Fri, 17 Oct 2003 09:41:27 +0200 (CEST),
Jaroslav wrote:
> 
> On Wed, 15 Oct 2003, Takashi Iwai 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.
> > thanks for the info!
> 
> I think that only one replacement makes sense - in
> snd_pcm_direct_server_create(). Fixed in CVS now.

hmm, it looks like server_job() needs _exit(), too.
i got an error
        Gdk-ERROR **: Fatal IO error 9 (Bad file descriptor) on X server :0.0.
when i stop the playback with xmms-alsa.
replacing exit() with _exit() fixes the error.


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