aboutsummaryrefslogtreecommitdiff
path: root/qga/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'qga/main.c')
-rw-r--r--qga/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qga/main.c b/qga/main.c
index 96d3cfa381..db281a508b 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 */