Closed BornThisWay closed 2 years ago
Sudo is single-threaded so there is no problem with multiple access. Also, standard I/O is not used, only the write(2) system call which is safe to use from a signal handler.
Also, access to signal_base->siginfo[] from outside the signal handler is done with all signals blocked.
Okay, thank you for your answer.
https://github.com/sudo-project/sudo/blob/63efad271a13124d739d536e9f5bf1dd110c3a1a/lib/util/event.c#L346
In this function:
The UNIX Specification describes the functions that guarantee call security in the signal processing program. Therefore, I have some doubts about the implementation of this function, please help to solve it, thank you.