mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-25 21:46:14 +01: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:
parent
6c41e77913
commit
ddeb4a211b
@ -547,6 +547,8 @@ write_err_and_exit (gint fd, gint msg)
|
|||||||
write_all (fd, &msg, sizeof(msg));
|
write_all (fd, &msg, sizeof(msg));
|
||||||
write_all (fd, &en, sizeof(en));
|
write_all (fd, &en, sizeof(en));
|
||||||
|
|
||||||
|
close (fd);
|
||||||
|
|
||||||
_exit (1);
|
_exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user