diff --git a/qga/main.c b/qga/main.c index 96d3cfa381b2e6464d94ef8d9a50432d3c148060..db281a508be6d6adb3123a31574d4b4328e84604 100644 --- a/qga/main.c +++ b/qga/main.c @@ -299,10 +299,12 @@ static bool ga_open_pidfile(const char *pidfile) goto fail; } + /* keep pidfile open & locked forever */ return true; fail: unlink(pidfile); + close(pidfd); return false; } #else /* _WIN32 */