Don't block signals when running hooks. Here ctx->sigset == defsigs ==
0x60006003, which blocks SIGTERM by default, so running something simple from a hook, like /etc/rc.d/racoon restart does not work. The script is then stuck waiting for the daemon to die, which it won't since it will never receive the signal, and the hook never terminates.
This commit is contained in:
parent
6ce4f404a1
commit
e35433dceb
|
@ -108,7 +108,8 @@ script_exec(const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env)
|
|||
for (i = 0; i < dhcpcd_signals_len; i++)
|
||||
sigaddset(&defsigs, dhcpcd_signals[i]);
|
||||
posix_spawnattr_setsigdefault(&attr, &defsigs);
|
||||
posix_spawnattr_setsigmask(&attr, &ctx->sigset);
|
||||
sigemptyset(&defsigs);
|
||||
posix_spawnattr_setsigmask(&attr, &defsigs);
|
||||
#endif
|
||||
errno = 0;
|
||||
r = posix_spawn(&pid, argv[0], NULL, &attr, argv, env);
|
||||
|
|
Loading…
Reference in New Issue