X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Futil.c;h=23d7e2211d8a94c1642452627b24ff208ead8559;hb=430c18ed7f576fd9041b0a02e7c4210bdd020a25;hp=e2859fafc1b115215eb7638125a126e031aa1bf5;hpb=2b590e135f53a1bd3e771bdc555f7bf28c4cd232;p=thirdparty%2Fsystemd.git diff --git a/src/util.c b/src/util.c index e2859fafc1b..23d7e2211d8 100644 --- a/src/util.c +++ b/src/util.c @@ -3977,6 +3977,17 @@ finish: hashmap_free_free(pids); } +int kill_and_sigcont(pid_t pid, int sig) { + int r; + + r = kill(pid, sig) < 0 ? -errno : 0; + + if (r >= 0) + kill(pid, SIGCONT); + + return r; +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime",