[haiku-commits] Re: r40544 - haiku/trunk/src/tests/system/libroot/posix

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Feb 2011 20:30:35 +0100

On 2011-02-23 at 14:44:11 [+0100], Jérôme Duval <korli@xxxxxxxxxxxxxxxx> 
wrote:
> 2011/2/23 Ingo Weinhold <ingo_weinhold@xxxxxx>:
> >> Not sure it's exactly #5679. As I read the JamVM code, pthread_kill
> >> deliver the signal to the selected thread, which should have the same
> >> sigaction handler as the main thread (signal disposition is common to
> >> the team). The problem I see is the sig_action array is located in
> >> Thread whereas it should be in Team.
> >
> > That's my point. We don't have a per-team signal handling, we do 
> > everything
> > per-thread. Signal handlers and masks exist (only) per-thread and signals
> > sent to the team are actually sent to the main thread.
> 
> OK. I just don't read explicitly in the ticket that threads except the
> main thread are therefore always without signal handler.

Indeed, feel free to add it, if you like.

> I see what is involved in
> http://dev.haiku-os.org/wiki/SignalSupportRevision. As a short term
> workaround, would it be possible to inherit signal handlers from the
> parent thread? Side effects wouldn't be so large I think.

Yep. Should be only an additional memcpy() in the thread creation code. I 
haven't investigated that aspect under BeOS yet.

> BTW is your signals branch aimed at providing a solution to this?

Yes, it is supposed to result in a fully POSIX compliant signals 
implementation.

CU, Ingo

Other related posts: