From: Lennart Poettering Date: Wed, 7 Feb 2018 02:10:09 +0000 (+0100) Subject: process-util: use raw_getpid() in getpid_cache() internally (#8115) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a542223174033e5b653cb0709885fc281277e56f;p=elogind.git process-util: use raw_getpid() in getpid_cache() internally (#8115) We have the raw_getpid() definition in place anyway, and it's certainly beneficial to expose the same semantics on pre glibc 2.24 and after it too, hence always bypass glibc for this, and always cache things on our side. Fixes: #8113 --- diff --git a/src/basic/process-util.c b/src/basic/process-util.c index ccf828389..ba8b3d80f 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -813,13 +813,6 @@ void sigkill_waitp(pid_t *pid) { sigkill_wait(*pid); } -void sigterm_wait(pid_t pid) { - assert(pid > 1); - - if (kill_and_sigcont(pid, SIGTERM) > 0) - (void) wait_for_terminate(pid, NULL); -} - int kill_and_sigcont(pid_t pid, int sig) { int r;