This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 11/15] Hurd signals: fix sigwait() for global signals
- From: Samuel Thibault <samuel dot thibault at gnu dot org>
- To: Jeremie Koenig <jk at jk dot fr dot eu dot org>
- Cc: libc-alpha at sourceware dot org, bug-hurd at gnu dot org,Roland McGrath <roland at hack dot frob dot com>
- Date: Sun, 3 Jul 2011 02:32:00 +0200
- Subject: Re: [PATCH 11/15] Hurd signals: fix sigwait() for global signals
- References: <1309365027-4774-1-git-send-email-jk@jk.fr.eu.org><1309365027-4774-12-git-send-email-jk@jk.fr.eu.org>
Jeremie Koenig, le Wed 29 Jun 2011 18:30:23 +0200, a écrit :
> * sysdeps/mach/hurd/sigwait.c (__sigwait): Change the blocking mask
> temporarily so that we catch global as well as thread-specific signals.
Mmm, this is unsafe: if yet another signal arrives between the
setjmp return and locking ss, it will be processed instead of being
blocked.
I know from experience that sigwait is a pain to implement correctly,
especially with threads with global signals, since you're supposed to
either deliver the global signal to some thread which doesn't block it,
or wake a thread which is waiting for it in sigwait...
Samuel