OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
CVS: cvs.openbsd.org: src

From: Philip Guenther (guenthercvs.openbsd.org)
Date: Thu Oct 02 2008 - 23:22:37 CDT


CVSROOT: /cvs
Module name: src
Changes by: guenthercvs.openbsd.org 2008/10/02 22:22:37

Modified files:
        sys/sys : proc.h
        sys/kern : kern_sig.c
        lib/librthread : rthread.h rthread_sig.c

Log message:
Make sigwait() work correctly. In particular, it'll work when the
signal is already pending in the calling thread or the main thread
and there's no longer a race condition where the signal could be
diverted but sigwait() would still block. There were some off-by-one
errors too.

(The checking of the main thread's pending list is just until a
pending list for the process can be added to struct process. For
now, such signals end up as pending on the main thread.)

oks tedu and art