]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Keep ignored SIGINT/SIGQUIT after set in a background job
authorjilles <jilles@FreeBSD.org>
Fri, 28 Aug 2020 15:35:45 +0000 (15:35 +0000)
committerjilles <jilles@FreeBSD.org>
Fri, 28 Aug 2020 15:35:45 +0000 (15:35 +0000)
commite083160b624297eef7bfb076afa6d161383cdf44
treeca257340e5cbd1bd5dc5b4ba0113f21f6194e3ef
parent9e8acab6af57feafb3724b30bfa13c21db0d110a
sh: Keep ignored SIGINT/SIGQUIT after set in a background job

If job control is not enabled, a background job (... &) ignores SIGINT and
SIGQUIT, but this can be reverted using the trap builtin in the same shell
environment.

Using the set builtin to change options would also revert SIGINT and SIGQUIT
to their previous dispositions.

This broke due to r317298. Calling setsignal() reverts the effect of
ignoresig().

Reported by: bdrewery
MFC after: 1 week
bin/sh/main.c
bin/sh/tests/execution/Makefile
bin/sh/tests/execution/bg13.0 [new file with mode: 0644]
bin/sh/trap.c
bin/sh/trap.h