POSIX threads question.

Logan Gabriel gersh at tabby.sonn.com
Tue Jul 6 20:17:24 PDT 2004


Hello,

I have a question about the POSIX standard regrading sigwait().  In
FreeBSD 4.x and 5.x (with -lc_r) the behaviour of sigwait to delete
SIGCHLD (And some others) from its waitset:

>From 4.x (libc_r/uthread/uthread_sigwait.c)

        /* These signals can't be waited on. */
        sigdelset(&waitset, SIGKILL);
        sigdelset(&waitset, SIGSTOP);
        sigdelset(&waitset, _SCHED_SIGNAL);
        sigdelset(&waitset, SIGCHLD);
        sigdelset(&waitset, SIGINFO);

Does the POSIX standard say that these signals cannot be waited on or is
it specfic undefined behaviour.  Linux (RedHat 9.1/Suse 9.1), Solaris 8
and MacOS X will let me use sigwait() to wait for SIGCHLD.  FreeBSD 5.2.1
will let me do it if I use -lpthread instead of -lc_r.


(Please CC me on any responses as I am not subscribed to standards@)

Thanks,
Logan Gabriel.


More information about the freebsd-standards mailing list