Do you think using libevent like this:

...
event ev;
event_set(&ev, SIGCHLD, EV_SIGNAL|EV_TIMEOUT, NULL, NULL);
timeval timeout = {5, 0};
event_add(&ev, *timeout);
event_dispatch();
...

would help you?

Andu.

On Fri, 2009-04-24 at 23:23 +0200, Giuseppe Scrivano wrote:
> Hello,
> 
> does somebody know how it is possible to setup a timeout for the waitpid
> syscall?  I don't want to do polling by WNOHANG and I don't want to use
> `alarm' because it is not a safe mechanism as it can be modified by the
> child process.  I would like to add timeouts to the Process class, any
> suggestion?
> 
> Regards,
> Giuseppe
> 
> 



Reply via email to