Bug #1313

Signal code in kernel needs major overhaul (signal queues, si_code, si_addr)

Added by hasso over 5 years ago. Updated over 4 years ago.

Status:NewStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Although our siginfo structure has a si_code member, we don't use it and
don't even have a defines related to it.

http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html

History

#1 Updated by alexh over 5 years ago

I'm currently working on this, especially for the most important cases (
platform/${arch}/${arch}/trap.c ).

#2 Updated by alexh over 5 years ago

corecode commented on this on IRC, and it seems the changes should not focus
just on adding support for si_code but rather a major overhaul.
New signal code using signal queues should be added instead of just hacking the
current code to support si_code and si_addr.

Possibly FreeBSD can be used as a reference as they use signal queues and
si_code/si_addr. Their basic structure is ksiginfo_t in sys/signalvar.h.

#3 Updated by alexh over 4 years ago

About this: I really think we should implement si_code and si_addr asap,
without any major overhaul or anything. Not having for example CLD_EXITED
breaks pkgsrc build of boost-libs, which in turn breaks 40-something more
packages. Both FreeBSD and NetBSD support this properly.

Any comments?

Cheers,
Alex Hornung

#4 Updated by corecode over 4 years ago

Alex Hornung (via DragonFly issue tracker) wrote:
> Alex Hornung <> added the comment:
>
> About this: I really think we should implement si_code and si_addr asap,
> without any major overhaul or anything. Not having for example CLD_EXITED
> breaks pkgsrc build of boost-libs, which in turn breaks 40-something more
> packages. Both FreeBSD and NetBSD support this properly.
>
> Any comments?

Agreed.

#5 Updated by alexh over 4 years ago

The most basic part made it into master already. This includes si_code for
most of the traps, and the proper defines for all of the si_code. This
unbreaks build of boost-libs, too, but still doesn't properly assign all the
SIGCHLD codes.

Cheers,
Alex Hornung

Also available in: Atom PDF