David Korn
2014-10-13 23:52:26 UTC
By default, when a signal handler is invoked, the signal is blocked and
then released when the signal handler completes.
Is there any way in the standard to specify that the signal remains blocked
when the signal handler completes?
My implementation of queued signals in ksh93 needs to store each of the
siginfo_t
structs for signals that have trap handlers until the trap handlers are
executed. My implementation calls malloc() in the signal handler to get
memory to store the siginfo_t
structs, but posix does not require that malloc() be async safe.
While our malloc() implementation is asyc safe, the standard does not
require this and therefore it can't use a standard malloc.
If the signal could be blocked until the handler function is called, queued
signals could be implemented in a portable fashion.
then released when the signal handler completes.
Is there any way in the standard to specify that the signal remains blocked
when the signal handler completes?
My implementation of queued signals in ksh93 needs to store each of the
siginfo_t
structs for signals that have trap handlers until the trap handlers are
executed. My implementation calls malloc() in the signal handler to get
memory to store the siginfo_t
structs, but posix does not require that malloc() be async safe.
While our malloc() implementation is asyc safe, the standard does not
require this and therefore it can't use a standard malloc.
If the signal could be blocked until the handler function is called, queued
signals could be implemented in a portable fashion.