daemon_pid will still be 0 if any tests were skipped. In particular
this happens during `make installcheck`.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99825
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
f->eavesdropper = NULL;
}
- test_kill_pid (f->daemon_pid);
- g_spawn_close_pid (f->daemon_pid);
+ if (f->daemon_pid != 0)
+ {
+ test_kill_pid (f->daemon_pid);
+ g_spawn_close_pid (f->daemon_pid);
+ f->daemon_pid = 0;
+ }
test_main_context_unref (f->ctx);
}
f->activated = NULL;
}
- test_kill_pid (f->daemon_pid);
- g_spawn_close_pid (f->daemon_pid);
+ if (f->daemon_pid != 0)
+ {
+ test_kill_pid (f->daemon_pid);
+ g_spawn_close_pid (f->daemon_pid);
+ f->daemon_pid = 0;
+ }
test_main_context_unref (f->ctx);