Hrvoje Niksic wrote:
> However, wouldn't it be nice if Gtk+ supported a "quiet shutdown"
> routine that could be called by the child process?
You may have a hard time convincing the Gtk+ developers that such a
routine is necessary, as the "child exit" problem is not even limited to
X development.
James Henstridge <[EMAIL PROTECTED]> writes:
> As you may know, X programs talk to the X server through a network
> socket connection.
:-) Yes, I know that.
However, wouldn't it be nice if Gtk+ supported a "quiet shutdown"
routine that could be called by the child process?
I have a hard time
No, this is what you would do in C for any X related program that forks.
As you may know, X programs talk to the X server through a network socket
connection. This is represented as a file descriptor for the process.
When you fork the process, both processes have file descriptors for this
one ne
James Henstridge <[EMAIL PROTECTED]> writes:
> You would get the same problem if you wrote a C GTK+ program that
> forked and you called exit(). In this case, you would call _exit()
> which bypasses all atexit handlers.
Should I raise this question on the Gtk+ list?
To unsubscribe: echo "unsubs
You would get the same problem if you wrote a C GTK+ program that forked
and you called exit(). In this case, you would call _exit() which
bypasses all atexit handlers.
In python this translates to using os._exit() instead of sys.exit().
James Henstridge.
--
Email: [EMAIL PROTECTED]
WWW: htt
Hrvoje Niksic wrote:
>
> OK, here is another interesting problem which took several hours to
> track. When a Gtk program forks off, it inherits the X file
> descriptors from its parent. It seems that when I call sys.exit(),
> Gdk gains control (either through atexit() or through a PyGtk cleanup
OK, here is another interesting problem which took several hours to
track. When a Gtk program forks off, it inherits the X file
descriptors from its parent. It seems that when I call sys.exit(),
Gdk gains control (either through atexit() or through a PyGtk cleanup
intercepting SystemExit), inter