system(3) should ignore SIGINT and SIGQUIT until the shell exits.
authormillert <millert@openbsd.org>
Sat, 21 May 2022 00:53:53 +0000 (00:53 +0000)
committermillert <millert@openbsd.org>
Sat, 21 May 2022 00:53:53 +0000 (00:53 +0000)
commit1e8f946230be3ea8f5e627c5c2847bc6a4013f08
treee6ab64eef0a163a2efa3141417a1667bc2070c40
parent665096dd97d5aad7a763b9f1de2882588f97c977
system(3) should ignore SIGINT and SIGQUIT until the shell exits.
This got broken when system.c was converted from signal(3) to sigaction(2).
Also add SIGINT and SIGQUIT to the set of blocked signals and unblock
them in the parent after the signal handlers are installed.
Based on a diff from Leon Fischer.  OK deraadt@
lib/libc/stdlib/system.c