Skip to content

Commit d9df332

Browse files
committed
native service: Check if daemon runs via is_running() call
1 parent a7f553b commit d9df332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int daemon_terminate(service_t *service)
6666
{
6767
int res = 0;
6868

69-
if (service->daemon_pid > 0) {
69+
if (is_running(service->daemon_pid)) {
7070
res = kill(service->daemon_pid, SIGTERM);
7171
if (res != 0) {
7272
ERR("kill failed, res=%d", res);

0 commit comments

Comments
 (0)