1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-26 03:47:52 +02:00

gspawn: close child_err_report_fd before exiting on error

When the child process is going to exit on error after fork() but before
exec(), let's close the child_err_report_fd. The practical value of this
is to placate valgrind --track-fds=yes.
This commit is contained in:
Michael Catanzaro
2024-08-30 11:42:12 -05:00
parent 6c41e77913
commit ddeb4a211b

@@ -546,6 +546,8 @@ write_err_and_exit (gint fd, gint msg)
write_all (fd, &msg, sizeof(msg));
write_all (fd, &en, sizeof(en));
close (fd);
_exit (1);
}