[gtkmm] Spawing a process and being notified of its termination



On Thu, Feb 19, 2004 at 08:35:46PM +0000, Chris Vine wrote:

While looking in the archives for some information on this subject, this
is the nearest hit I've got:

> > and I would like to know how I can be notified of the death of the child
> > process.
> You would normally do it by handling SIGCHLD and/or waiting on waitpid() (you 
> can call waitpid() in the child handler which is a good way of avoiding 
> zombies).

I know how to wait for a child process using SIGCHLD or using waitpid,
however I'd like to run some Gtk-- code when the child exits, and
SIGCHLD could happen when Gtk is inside some non-reentrant block.

Since I presume I can't emit a signal inside the SIGCHLD handling. what
is a Gtk friendly way of, say, popping up a MessageDialog when a child
that was forked some time ago finally exits?


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico debian org>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]