Module Name: src Committed By: kamil Date: Sat May 19 02:42:59 UTC 2018
Modified Files: src/sys/kern: kern_sig.c src/tests/lib/libc/sys: t_fork.c Log Message: Stop masking SIGSTOP in a vfork(2)ed child Keep the traditional BSD behavior masking SIGTSTP, SIGTTIN and SIGTTOU in a vfork(2)ed child before exec(3)/exit(3). This is useful in shells and prevents deadlocking, when a parent cannot unstop the sleeping child. Change the behavior for SIGSTOP. This signal is by design not maskable and this property shall be obeyed without exceptions. The STOP behavior is expected in the context of debuggers and useful in standalone programs. It is still possible to stop a vfork(2)ed child, however it requires proc.curproc.stopfork=1, but it is not a flexible solution. FreeBSD and OpenBSD keep masking SIGSTOP in a vfork(2)ed child. Linux does not mask stop signals in the same scenarios. This fixes ATF test: t_vfork:raise2. No known regressions reported in the existing ATF tests. Discussed with <kre> Sponsored by <The NetBSD Foundation> To generate a diff of this commit: cvs rdiff -u -r1.344 -r1.345 src/sys/kern/kern_sig.c cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_fork.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.