[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-myserver] waitpid timeout
From: |
Alexandru IANCU |
Subject: |
Re: [bug-myserver] waitpid timeout |
Date: |
Sat, 25 Apr 2009 12:51:30 +0300 |
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
>
>