This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 11/15] Hurd signals: fix sigwait() for global signals


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]