Date: Thu, 29 May 2003 16:56:47 -0400 (EDT) From: Daniel Eischen <eischen@pcnet.com> To: Alexander Kabaev <ak03@gte.com> Cc: freebsd-threads@freebsd.org Subject: Re: lock with openoffice build with libkse Message-ID: <Pine.GSO.4.10.10305291648510.28562-100000@pcnet5.pcnet.com> In-Reply-To: <20030529164629.5963bde9.ak03@gte.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 29 May 2003, Alexander Kabaev wrote: > On Thu, 29 May 2003 16:29:23 -0400 (EDT) > Daniel Eischen <eischen@pcnet.com> wrote: > > > On Thu, 29 May 2003, Alexander Kabaev wrote: > > > > > Daniel, > > > > > > attached program is enough to trigger the loop. It looks like > > > the setjump/longjmp from signal handler trick only forks for > > > the first time. > > > > You can try this patch. It puts the cart before the horse > > though, so signals could get delivered in a different > > order. > > Yuck :(. Shouldn't you just unblock this particular signal instead of > setting the whole mask? If it never returns from the handler (longjmp's out), then the signal mask will never be correct. You have to set the mask back to what it would be if sigreturn() were called. Ok, this fix should be better. -- Dan Eischen Index: thread/thr_sigprocmask.c =================================================================== RCS file: /home/ncvs/src/lib/libpthread/thread/thr_sigprocmask.c,v retrieving revision 1.13 diff -u -r1.13 thr_sigprocmask.c --- thread/thr_sigprocmask.c 16 Sep 2002 08:45:36 -0000 1.13 +++ thread/thr_sigprocmask.c 29 May 2003 20:55:28 -0000 @@ -44,5 +44,8 @@ int _sigprocmask(int how, const sigset_t *set, sigset_t *oset) { - return (pthread_sigmask(how, set, oset)); + if (_kse_isthreaded() != 0) + return (pthread_sigmask(how, set, oset)); + else + return (__sys_sigprocmask(how, set, oset)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10305291648510.28562-100000>