Re: We must use _exit after fork
- From: Ali Akcaagac <ali akcaagac stud fh-wilhelmshaven de>
- To: Emmanuel <e allaud wanadoo fr>
- Cc: balsa-list gnome org
- Subject: Re: We must use _exit after fork
- Date: Thu, 6 Sep 2001 19:57:38 +0200
On 2001.09.06 10:30:40 +0200 Emmanuel wrote:
> Hi all,
> I'm reading Gtk+FAG, it's really instructive :)
> Here is the interesting part
>
> 5.3. 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().
>
> You also have a example program.
yes and ? i've stated a fully fork+_exit code example on this
list some weeks ago.
--
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]