Re: sigwait() and 2.6

From: Ulrich Drepper
Date: Tue Feb 15 2005 - 19:01:15 EST


On Tue, 15 Feb 2005 13:58:28 +0100, Yves Crespin
<crespin.quartz@xxxxxxxxxx> wrote:
> ThreadUnblockSignal();
> signo = WaitSignal();
> ThreadBlockSignal();

You expect this to work? Just read the POSIX spec or even the man
pages. All signals sigwait() waits for must be blocked before the
call. You deliberately do the opposite. Swap the ThreadUnblockSignal
and ThreadBlockSignal lines and suddenly the program doesn't crash
anymore.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/