summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-service.c')
-rw-r--r--hcid/dbus-service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index a8fb13ed..213dd279 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -322,7 +322,7 @@ static gboolean service_shutdown_timeout(gpointer data)
static void stop_service(struct service *service, gboolean remove)
{
- if (kill(service->pid, SIGTERM) < 0)
+ if (service->pid > 0 && kill(service->pid, SIGTERM) < 0)
error("kill(%d, SIGTERM): %s (%d)", service->pid,
strerror(errno), errno);