process-util: move more process related calls to process-util.[ch]

This commit is contained in:
Lennart Poettering
2015-10-26 01:24:39 +01:00
parent 2583fbea8e
commit 4d0d3d41d2
4 changed files with 13 additions and 14 deletions
+10
View File
@@ -480,6 +480,16 @@ int wait_for_terminate_and_warn(const char *name, pid_t pid, bool check_exit_cod
return -EPROTO;
}
void sigkill_wait(pid_t *pid) {
if (!pid)
return;
if (*pid <= 1)
return;
if (kill(*pid, SIGKILL) > 0)
(void) wait_for_terminate(*pid, NULL);
}
int kill_and_sigcont(pid_t pid, int sig) {
int r;