Skip to content



sgetmask - Get the current signal mask of the calling thread


The sgetmask() syscall retrieves the current signal mask for the calling thread in the form of an integer. The signal mask consists of a set of bits, one for each signal, that specifies which signals are blocked from delivery to the thread. By default, signals will always be blocked when they are generated. This syscall allows processes to customize this behavior by blocking or unblocking specific signals. It is not possible to unblock signals that were not blocked in the first place.


No arguments.

Available Tags



No hooks configured.

Example Use Case

This syscall could be used in multi-threaded applications to discover which signals are blocked in each thread. This could be used to implement custom signal handling strategies on a per-thread basis.


This syscall may be vulnerable to TOCTOU (time of check, time of use) race conditions. It is possible that a signal mask could be changed between the time the syscall is invoked and the time the updated signal mask value is returned.

  • sigprocmask() - Used to set or retrieve the signal mask of a specified process.

This document was automatically generated by OpenAI and needs review. It might not be accurate and might contain errors. The authors of Tracee recommend that the user reads the "events.go" source file to understand the events and their arguments better.