httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: [mpm] No sigwait(2) on SVR4
Date Fri, 13 Aug 1999 20:44:57 GMT
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);
    }
    sig = one of the flags;
    unset flag;
    return something;
}

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"Hypocrisy is the greatest luxury." - Disposable Heroes of Hiphoprisy

Mime
View raw message