Ticket #2695 (closed enhancement: duplicate)

Opened 19 months ago

Last modified 6 weeks ago

[XSI] Implement SA_SIGINFO for sigaction

Reported by: andreasf Owned by: axeld
Priority: normal Milestone: R1
Component: System/POSIX Version: R1/pre-alpha1
Keywords: Cc: haiku@…, kallisti5@…
Blocked By: #1935 Platform: All
Blocking:

Description

Haiku currently supports default POSIX signal handlers with no additional signal info, and BeOS' derived signal handlers with additional register access and user-supplied data.

Not yet supported are the extended POSIX signal handlers with siginfo_t and ucontext_t arguments. Some parts thereof are already prepared in the headers but commented out since not implemented on the kernel side.

 http://www.opengroup.org/onlinepubs/009695399/functions/sigaction.html

I had recently submitted a first draft patch for the x86 kernel side signal frame setup. Some fields are not initialized yet, and some information is not (yet) easily obtainable according to Ingo.

 http://www.freelists.org/archives/haiku-development/08-2008/msg00262.html

Attachments

siginfo_2009-11-17.diff Download (5.5 KB) - added by andreasf 4 months ago.
Git branch from 2008-08-11, rebased
siginfo_2010-01-25.diff Download (5.7 KB) - added by andreasf 7 weeks ago.
rebased branch

Change History

Changed 17 months ago by scottmc

  • cc haiku@… added

Changed 5 months ago by kaliber

  • component changed from System to System/POSIX

Changed 4 months ago by andreasf

Git branch from 2008-08-11, rebased

Changed 4 months ago by andreasf

I've attached my incomplete work on this, in case someone wants to pick it up.

My patches still cleanly applied to HEAD and didn't appear to crash the system. Maybe the kernel part could be integrated already while leaving the preprocessor symbols undefined for userland apps?

Changed 7 weeks ago by kallisti5

+1 for someone implementing this.

This is what currently holds ruby 1.9 back from cleanly compiling cleanly on Haiku.

 http://redmine.ruby-lang.org/issues/show/2640

Changed 7 weeks ago by kallisti5

  • cc kallisti5@… added

Changed 7 weeks ago by andreasf

rebased branch

Changed 7 weeks ago by andreasf

  • blockedby 5324 added

Changed 7 weeks ago by stippi

Thanks for the patch. I am too clueless with regards to POSIX to know whether this should already be applied or not. Maybe someone with more overview of the possible effects could have a look.

Changed 7 weeks ago by kallisti5

this bug can be worked around on the application side, but if an app assumes that the full POSIX standard is adopted it will fail to compile.

Ruby added a work around in  http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=26399

#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO)		
#define USE_SIGALTSTACK		
#endif

If SA_SIGINFO is defined down the road improperly it may cause problems as code will try and use it.

Changed 6 weeks ago by bonefish

  • blockedby 5324 removed

(In #5324) ucontext_t and mcontext_t should rather be added as part of implementing SA_SIGINFO (the only feature using these structures), which in turn should be implemented as part of real-time signal support. Cf. #1935.

Changed 6 weeks ago by bonefish

  • status changed from new to closed
  • resolution set to duplicate
  • blockedby 1935 added

Sorry for not doing this earlier. As discussed via mail, this feature cannot be implemented without real-time signal support. Therefore closing it as duplicate of #1935.

Note: See TracTickets for help on using tickets.