mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
executor: really set POSIX_SPAWN_SETSIGDEF for posix_spawn
posix_spawnattr_setflags() doesn't OR the input to the current set of flags,
it overwrites them, so we are currently losing POSIX_SPAWN_SETSIGDEF.
Follow-up for: 6ecdfe7d10
This commit is contained in:
committed by
Luca Boccassi
parent
4e71714bca
commit
9ca13d60db
@@ -2054,10 +2054,8 @@ int posix_spawn_wrapper(const char *path, char *const *argv, char *const *envp,
|
||||
r = posix_spawnattr_init(&attr);
|
||||
if (r != 0)
|
||||
return -r; /* These functions return a positive errno on failure */
|
||||
r = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);
|
||||
if (r != 0)
|
||||
goto fail;
|
||||
r = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGDEF); /* Set all signals to SIG_DFL */
|
||||
/* Set all signals to SIG_DFL */
|
||||
r = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK|POSIX_SPAWN_SETSIGDEF);
|
||||
if (r != 0)
|
||||
goto fail;
|
||||
r = posix_spawnattr_setsigmask(&attr, &mask);
|
||||
|
||||
Reference in New Issue
Block a user