diff options
author | Daniel Mack <github@zonque.org> | 2015-11-17 09:33:59 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-11-17 09:33:59 +0100 |
commit | bf7e619b3b2b97ff2a4952ab125c794c0d3bdb5f (patch) | |
tree | 9b94bf28557da6f2d5a78da20c44b5da9b8e8676 /src/nspawn | |
parent | f1f8a5a5e110f485257e8702ad30b9997e529a74 (diff) | |
parent | 6059dab8897ecd24a51a6601499c1bb9002bc54a (diff) |
Merge pull request #1924 from poettering/some-fixes-2
casting fixes, another siphash24 alignment fix, and more
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index d2ce731c72..f6a2c0386e 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2283,7 +2283,7 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) { static int on_orderly_shutdown(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata) { pid_t pid; - pid = PTR_TO_UINT32(userdata); + pid = PTR_TO_PID(userdata); if (pid > 0) { if (kill(pid, arg_kill_signal) >= 0) { log_info("Trying to halt container. Send SIGTERM again to trigger immediate termination."); @@ -3510,8 +3510,8 @@ int main(int argc, char *argv[]) { if (arg_kill_signal > 0) { /* Try to kill the init system on SIGINT or SIGTERM */ - sd_event_add_signal(event, NULL, SIGINT, on_orderly_shutdown, UINT32_TO_PTR(pid)); - sd_event_add_signal(event, NULL, SIGTERM, on_orderly_shutdown, UINT32_TO_PTR(pid)); + sd_event_add_signal(event, NULL, SIGINT, on_orderly_shutdown, PID_TO_PTR(pid)); + sd_event_add_signal(event, NULL, SIGTERM, on_orderly_shutdown, PID_TO_PTR(pid)); } else { /* Immediately exit */ sd_event_add_signal(event, NULL, SIGINT, NULL, NULL); |