diff options
-rw-r--r-- | hcid/dbus-service.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index d60cc6f8..a8fb13ed 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -271,7 +271,7 @@ static void abort_startup(struct service *service, DBusConnection *conn, int eco service->action = NULL; } - if (service->pid && kill(service->pid, SIGKILL) < 0) + if (service->pid > 0 && kill(service->pid, SIGKILL) < 0) error("kill(%d, SIGKILL): %s (%d)", service->pid, strerror(errno), errno); } @@ -311,7 +311,7 @@ static gboolean service_shutdown_timeout(gpointer data) debug("Sending SIGKILL to \"%s\" (PID %d) since it didn't exit yet", service->name, service->pid); - if (kill(service->pid, SIGKILL) < 0) + if (service->pid > 0 && kill(service->pid, SIGKILL) < 0) error("kill(%d, SIGKILL): %s (%d)", service->pid, strerror(errno), errno); |