Commit dd73699b authored by Andrey Vagin's avatar Andrey Vagin

zdtm: set SA_RESTART everywhere

parent 0981f361
...@@ -167,7 +167,10 @@ struct zdtm_clone_arg { ...@@ -167,7 +167,10 @@ struct zdtm_clone_arg {
static int do_test_fn(void *_arg) static int do_test_fn(void *_arg)
{ {
struct zdtm_clone_arg *ca = _arg; struct zdtm_clone_arg *ca = _arg;
struct sigaction sa; struct sigaction sa = {
.sa_handler = SIG_DFL,
.sa_flags = SA_RESTART,
};
/* record the test pid to remember the ownership of the pidfile */ /* record the test pid to remember the ownership of the pidfile */
master_pid = getpid(); master_pid = getpid();
...@@ -175,7 +178,6 @@ static int do_test_fn(void *_arg) ...@@ -175,7 +178,6 @@ static int do_test_fn(void *_arg)
fclose(ca->pidf); fclose(ca->pidf);
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_DFL;
if (sigaction(SIGCHLD, &sa, NULL)) { if (sigaction(SIGCHLD, &sa, NULL)) {
err("Can't reset SIGCHLD handler: %m\n"); err("Can't reset SIGCHLD handler: %m\n");
exit(1); exit(1);
...@@ -200,6 +202,7 @@ void test_init_ns(int argc, char **argv, unsigned long clone_flags, void (*fn)(v ...@@ -200,6 +202,7 @@ void test_init_ns(int argc, char **argv, unsigned long clone_flags, void (*fn)(v
static FILE *pidf; static FILE *pidf;
struct sigaction sa = { struct sigaction sa = {
.sa_handler = sig_hand, .sa_handler = sig_hand,
.sa_flags = SA_RESTART,
}; };
struct zdtm_clone_arg ca; struct zdtm_clone_arg ca;
void *stack; void *stack;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment