Why a signal that is blocked not shown up in SigPnd of /proc/pid/status when it is sent
1
vote
2
answers
38
views
**Fact**
1. A signal may be blocked, which means that it will not be delivered
until it is later unblocked. Between the time when it is
generated and when it is delivered a signal is said to be pending. [Manpage](https://man7.org/linux/man-pages/man7/signal.7.html)
2. SigPnd (in /proc/pid/status): Mask (expressed in hexadecimal) of signals pending
for thread and for process as a whole [Manpage](https://man7.org/linux/man-pages/man5/proc_pid_status.5.html)
==> So if a signal is being blocked by a process and I send the signal to that process, that signal is "pending" and should show up in SigPnd.
**Situation**
I blocked a signal, say SIGUSR2, with
sigprocmask
.
This is the result of /proc/pid/status
SigQ: 0/21148
SigPnd: 0000000000000000
SigBlk: 0000000000000aec
SigIgn: 0000000000000200
SigCgt: 0000000000000000
SigBlk shows that SIGUSR2 is being
Then I send SIGUSR2 with kill
**Expectation**
SigPnd: 0000000000000aec
because SIGUSR2 is being blocked so it is not delivered (aka pending)
**Reality**
SigPnd: 0000000000000000
**Question**
Why SigPnd does not show up as my expectation?
Asked by Tran Triet
(715 rep)
Mar 1, 2025, 10:23 AM
Last activity: Mar 5, 2025, 05:01 PM
Last activity: Mar 5, 2025, 05:01 PM