Since signal-catching functions are invoked asynchronously with
process execution, you need to take into account the
same sort of things that you would in a multithreaded program when
inspecting or manipulating shared resources; you might have to
call
InterruptLock()
or
InterruptUnlock(),
but these functions aren't portable.
If a process sets the action for the SIGCHLD signal to
SIG_IGN,
its children won't enter the zombie state and the process can't use
wait()
or
waitpid()
to wait on their deaths.