system/exit-with-parent.c: Close the file descriptor before exit
PATCH 1/1 system/exit-with-parent.c: Close the file descriptor before exit
On macOS we leak the open file descriptor in the background thread. Close it before returning.
Reported-by Thomas Huth
Fixes commit 886898baad ("Implement -run-with exit-with-parent=on")
Signed-off-by Richard W.M. Jones <[email protected]>
--- system/exit-with-parent.c | 1 + 1 file changed, 1 insertion(+)
system/exit-with-parent.c +1 -0
@@ -109,6 +109,7 @@ exit_with_parent_loop(void *vp)/* Behave like Linux and FreeBSD above, as if SIGTERM was sent */ qemu_system_killed (SIGTERM , ppid); } +close (fd);return NULL ; }
Signature · 1 line
2.53.0
Quoted 16 lines · Richard W.M. Jones
On macOS we leak the open file descriptor in the background thread. Close it before returning.
Reported-by Thomas HuthFixes commit 886898baad ("Implement -run-with exit-with-parent=on")Signed-off-by Richard W.M. Jones <[email protected]>--- system/exit-with-parent.c | 1 + 1 file changed, 1 insertion(+)system/exit-with-parent.c +0
-0
system/exit-with-parent.c exit_with_parent_loop(void *vp) · line 115
Quoted 7 lines
system/exit-with-parent.c +1
-0@@ -109,6 +109,7 @@ exit_with_parent_loop(void *vp)/* Behave like Linux and FreeBSD above, as if SIGTERM was sent */ qemu_system_killed (SIGTERM , ppid); } +close (fd);return NULL ; }
Reviewed-by Thomas Huth <[email protected]>