mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-12 20:36:15 +01:00
Merge branch 'spawn-error-handling' into 'master'
gspawn: Handle error opening /dev/null See merge request GNOME/glib!1681
This commit is contained in:
commit
6cf381ee75
@ -1451,6 +1451,9 @@ do_exec (gint child_err_report_fd,
|
||||
else if (stderr_to_null)
|
||||
{
|
||||
gint write_null = safe_open ("/dev/null", O_WRONLY);
|
||||
if (write_null < 0)
|
||||
write_err_and_exit (child_err_report_fd,
|
||||
CHILD_DUP2_FAILED);
|
||||
safe_dup2 (write_null, 2);
|
||||
close_and_invalidate (&write_null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user