On Thu, Jun 07, 2018 at 12:02:46PM +0200, Willy Tarreau wrote: > On Thu, Jun 07, 2018 at 11:50:45AM +0200, William Lallemand wrote: > > /* block signal delivery during processing */ > > +#ifdef USE_THREAD > > + pthread_sigmask(SIG_SETMASK, &blocked_sig, &old_sig); > > +#else > > sigprocmask(SIG_SETMASK, &blocked_sig, &old_sig); > > +#endif > > I think for the merge we'd rather put a wrapper into hathreads.h, like > "ha_sigmask()" which uses either pthread_sigmask() or sigprocmask(). > > That will remove ifdefs and lower the risk of reusing these unsafe > calls. > > What do you think ? >
Agreed, I'll rework the patches once they are tested. -- William Lallemand

