Konstantin Belousov a3de221dbe Among signal generation syscalls, only sigqueue(2) is allowed by POSIX
to fail due to lack of resources to queue siginfo. Add KSI_SIGQ flag
that allows sigqueue_add() to fail while trying to allocate memory for
new siginfo. When the flag is not set, behaviour is the same as for
KSI_TRAP: if memory cannot be allocated, set bit in sq_kill. KSI_TRAP is
kept to preserve KBI.

Add SI_KERNEL si_code, to be used in siginfo.si_code when signal is
generated by kernel. Deliver siginfo when signal is generated by kill(2)
family of syscalls (SI_USER with properly filled si_uid and si_pid), or
by kernel (SI_KERNEL, mostly job control or SIGIO). Since KSI_SIGQ flag
is not set for the ksi, low memory condition cause old behaviour.

Keep psignal(9) KBI intact, but modify it to generate SI_KERNEL
si_code. Pgsignal(9) and gsignal(9) now take ksi explicitely. Add
pksignal(9) that behaves like psignal but takes ksi, and ddb kill
command implemented as pksignal(..., ksi = NULL) to not do allocation
while in debugger.

While there, remove some register specifiers and use ANSI C prototypes.

Reviewed by:	davidxu
MFC after:	1 month
2009-11-17 11:39:15 +00:00
..
2009-06-25 12:46:59 +00:00
2009-11-04 15:24:32 +00:00
2009-01-01 02:08:56 +00:00
2009-01-01 02:08:56 +00:00
2009-05-27 16:36:54 +00:00
2009-11-03 20:22:09 +00:00
2009-01-01 02:29:17 +00:00
2009-05-09 19:01:24 +00:00
2009-09-19 17:56:26 +00:00
2009-10-23 15:10:41 +00:00
2009-01-01 02:11:01 +00:00
2009-11-06 07:17:31 +00:00
2009-10-02 11:14:12 +00:00
2008-09-22 10:37:02 +00:00
2008-07-23 16:44:20 +00:00
2009-10-27 11:01:40 +00:00
2009-10-27 11:01:40 +00:00
2009-10-27 11:01:40 +00:00
2009-05-07 13:49:48 +00:00
2009-03-01 04:57:23 +00:00
2009-09-06 10:27:45 +00:00
2009-09-06 09:39:40 +00:00
2009-08-23 08:04:40 +00:00
2009-06-25 12:46:59 +00:00