diff --git a/qemu-ga.c b/qemu-ga.c index 8d53e04a0fcb1c0683e98110784f8043cd5f8165..6e7caedc41d8683c792585d1c5aa9cfdf0f73886 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -445,9 +445,9 @@ static void become_daemon(const char *pidfile) goto fail; } - close(STDIN_FILENO); - close(STDOUT_FILENO); - close(STDERR_FILENO); + reopen_fd_to_null(STDIN_FILENO); + reopen_fd_to_null(STDOUT_FILENO); + reopen_fd_to_null(STDERR_FILENO); return; fail: