Date: Tue, 17 Nov 2009 11:39:15 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/ddb db_command.c src/sys/kern kern_sig.c tty.c src/sys/sys signal.h signalvar.h Message-ID: <200911171139.nAHBdulb095502@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2009-11-17 11:39:15 UTC FreeBSD src repository Modified files: sys/ddb db_command.c sys/kern kern_sig.c tty.c sys/sys signal.h signalvar.h Log: SVN rev 199355 on 2009-11-17 11:39:15Z by kib 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 Revision Changes Path 1.81 +1 -1 src/sys/ddb/db_command.c 1.383 +53 -29 src/sys/kern/kern_sig.c 1.333 +14 -2 src/sys/kern/tty.c 1.59 +1 -0 src/sys/sys/signal.h 1.84 +5 -3 src/sys/sys/signalvar.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911171139.nAHBdulb095502>