On Thu, 2005-08-11 at 15:26 +0100, Gustavo J. A. M. Carneiro wrote: > On Thu, 2005-08-11 at 16:21 +0200, Radek Vykydal wrote: > > Hello, > > > > I wrote a python module which forks and execes a child. > > In the parent I made (with signal.signal()) handler to > > catch SIGCHLD and the parent calls gtk.main() to wait for the > > child's exit(). The SIGCHLD handler calls os.waitpid() > > and gtk.main_quit(). > > > > The module works fine alone, but when I incorporate it > > into application which is calling gtk.gdk.threads_init() before > > running it's mainloop, the > > SIGCHLD handler isn't called (after the the child's exit()). > > > > Could you tell me the reason and, possibly, recommend me > > how I can wait for the child in better way? > > (requires pygtk >= 2.6) > > def child_cb(pid, status): > # do something > > gobject.child_watch_add(pid, child_cb) >
unfortunately, I must use pygtk 2.0 _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
