mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-02-26 05:43:09 +07:00
reset signal mask when forking
This commit is contained in:
parent
e9af15c34c
commit
309bff19ed
@ -6,6 +6,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "execute.h"
|
||||
#include "strv.h"
|
||||
@ -121,8 +122,16 @@ int exec_spawn(const ExecCommand *command, const ExecContext *context, int *fds,
|
||||
char **e, **f = NULL;
|
||||
int i, r;
|
||||
char t[16];
|
||||
sigset_t ss;
|
||||
|
||||
/* child */
|
||||
|
||||
if (sigemptyset(&ss) < 0 ||
|
||||
sigprocmask(SIG_SETMASK, &ss, NULL) < 0) {
|
||||
r = EXIT_SIGNAL_MASK;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
umask(context->umask);
|
||||
|
||||
if (chdir(context->directory ? context->directory : "/") < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user