diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-28 00:10:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-28 00:10:11 +0200 |
commit | 48904026eab618f4b3a7d10cbde45ab9167f835d (patch) | |
tree | a2b3818fcb6ca7592e80e6445ad565e59c0480e0 | |
parent | 0906b32087c3d7db6844873a7d46241430a1b065 (diff) | |
parent | 7ea7754e4acf8d281577c481a0310c1e0e490408 (diff) | |
download | podman-48904026eab618f4b3a7d10cbde45ab9167f835d.tar.gz podman-48904026eab618f4b3a7d10cbde45ab9167f835d.tar.bz2 podman-48904026eab618f4b3a7d10cbde45ab9167f835d.zip |
Merge pull request #3452 from QazerLab/bugfix/pause-sigterm
Exclude SIGTERM from blocked signals for pause process.
-rw-r--r-- | pkg/rootless/rootless_linux.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index c409e3343..d58a08801 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -82,7 +82,7 @@ do_pause () struct sigaction act; int const sig[] = { - SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGPOLL, + SIGALRM, SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGPOLL, SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ, 0 }; @@ -542,6 +542,11 @@ reexec_userns_join (int userns, int mountns, char *pause_pid_file_path) fprintf (stderr, "cannot sigdelset(SIGCHLD): %s\n", strerror (errno)); _exit (EXIT_FAILURE); } + if (sigdelset (&sigset, SIGTERM) < 0) + { + fprintf (stderr, "cannot sigdelset(SIGTERM): %s\n", strerror (errno)); + _exit (EXIT_FAILURE); + } if (sigprocmask (SIG_BLOCK, &sigset, &oldsigset) < 0) { fprintf (stderr, "cannot block signals: %s\n", strerror (errno)); @@ -736,6 +741,11 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re fprintf (stderr, "cannot sigdelset(SIGCHLD): %s\n", strerror (errno)); _exit (EXIT_FAILURE); } + if (sigdelset (&sigset, SIGTERM) < 0) + { + fprintf (stderr, "cannot sigdelset(SIGTERM): %s\n", strerror (errno)); + _exit (EXIT_FAILURE); + } if (sigprocmask (SIG_BLOCK, &sigset, &oldsigset) < 0) { fprintf (stderr, "cannot block signals: %s\n", strerror (errno)); |