signals: a blocked signal stays pending instead of killing
sigsend() ended a process for a default-fatal signal (SIGUSR1, SIGTERM, SIGINT...) on arrival, whatever its signal mask said. Blocking is exactly the promise that it will not: the signal waits until it is unblocked, or until the program takes it some other way -- which is what signalfd is, and how this was found. A blocked signal is now only made pending. If it is later unblocked while still pending, deliver_signals() applies the default action then. SIGKILL cannot be blocked, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
5ed8f1b0d5
commit
6bfb367090
3 changed files with 40 additions and 12 deletions
|
|
@ -530,6 +530,7 @@ int proc_pgid(int pid);
|
|||
int proc_setpgid(int pid, int pgid);
|
||||
int proc_setsid(void);
|
||||
int sigsend(int pid, int sig);
|
||||
int sig_default_kills(int sig);
|
||||
int proc_exists(int);
|
||||
int proc_num(void);
|
||||
struct procinfo;
|
||||
|
|
|
|||
Loading…
Reference in a new issue