httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [mpm] No sigwait(2) on SVR4
Date Fri, 13 Aug 1999 20:54:34 GMT


On Fri, 13 Aug 1999, Manoj Kasichainula wrote:

> On Fri, Aug 13, 1999 at 10:27:52PM +0200, Ralf S. Engelschall wrote:
> > Hmmm... SIGEV_THREAD is not very portable IMHO. 
> > I would avoid to use it...
> 
> Yeah, that's what I thought. The really cool and useful stuff never
> is.
> 
> Here's a possibility for emulating sigwait.
> 
> int lame_sigwait(const sigset_t *set, int *sig)
> {
>     for (spoon = every signal in set) {
>         signal(spoon, signal_flag_setter);
>     }
>     while (a flag isn't set) {
>         sleep(1);

use select with no timeout, you get EINTR. 

>     }
>     sig = one of the flags;
>     unset flag;
>     return something;
> }
> 


what about pause() or sigsuspend()?

Dean


Mime
View raw message