summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-17 18:28:53 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-18 02:51:47 +0100
commit9f5650aecb22a1d864b2c0b749910556795f1490 (patch)
tree62283b6837299eff161d62438372ec6d54d6b451 /src/libsystemd/sd-bus
parented7e5fe37d7e3392538844abadbb2903f4d2540f (diff)
util: generalize code that checks whether PIDs are alive or unwaited for
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/bus-creds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-creds.c b/src/libsystemd/sd-bus/bus-creds.c
index 677e94b3ba..6143254a60 100644
--- a/src/libsystemd/sd-bus/bus-creds.c
+++ b/src/libsystemd/sd-bus/bus-creds.c
@@ -148,7 +148,7 @@ _public_ int sd_bus_creds_new_from_pid(pid_t pid, uint64_t mask, sd_bus_creds **
/* Check if the process existed at all, in case we haven't
* figured that out already */
- if (kill(pid, 0) < 0 && errno == ESRCH) {
+ if (!pid_is_alive(pid)) {
sd_bus_creds_unref(c);
return -ESRCH;
}