The code in the wsp::process class constructor uses posix_spawn() to create a child process. In particular, it sets the POSIX_SPAWN_SETSIGDEF flag via posix_spawnattr_setflags():
The goal was apparently to reset the ignored (SIG_IGN) state set by the server for certain signals (e.g. SIGINT) back to their default handlers.
However, the POSIX_SPAWN_SETSIGDEF flag only makes sense when used together with a posix_spawnattr_setsigdefault() call, otherwise it has no effect because it will apply to an empty signal set. Quoting http://linux.die.net/man/3/posix_spawnattr_setsigdefault :
"
The spawn-sigdefault attribute represents the set of signals to be forced to default signal handling in the new process image (if POSIX_SPAWN_SETSIGDEF is set in the spawn-flags attribute) by a spawn operation. The default value of this attribute shall be an empty signal set.
"
As a result, the SST process spawn code does not reset any ignored signal as intended.
The code in the wsp::process class constructor uses posix_spawn() to create a child process. In particular, it sets the POSIX_SPAWN_ SETSIGDEF flag via posix_spawnattr _setflags( ):
err_ = posix_spawnattr _setflags (&attr, POSIX_SPAWN_ SETSIGDEF |
POSIX_ SPAWN_USEVFORK) ;
The goal was apparently to reset the ignored (SIG_IGN) state set by the server for certain signals (e.g. SIGINT) back to their default handlers.
However, the POSIX_SPAWN_ SETSIGDEF flag only makes sense when used together with a posix_spawnattr _setsigdefault( ) call, otherwise it has no effect because it will apply to an empty signal set. Quoting http:// linux.die. net/man/ 3/posix_ spawnattr_ setsigdefault :
" SETSIGDEF is set in the spawn-flags attribute) by a spawn operation. The default value of this attribute shall be an empty signal set.
The spawn-sigdefault attribute represents the set of signals to be forced to default signal handling in the new process image (if POSIX_SPAWN_
"
As a result, the SST process spawn code does not reset any ignored signal as intended.