POSIX threads question.

David Schultz das at FreeBSD.ORG
Tue Jul 6 20:30:39 PDT 2004


On Tue, Jul 06, 2004, Logan Gabriel wrote:
> 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.

I don't think POSIX allows this behavior, but it's merely a
limitation of libc_r, so it shouldn't be an issue as 5.X moves
forward.


More information about the freebsd-standards mailing list