mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +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)
|
else if (stderr_to_null)
|
||||||
{
|
{
|
||||||
gint write_null = safe_open ("/dev/null", O_WRONLY);
|
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);
|
safe_dup2 (write_null, 2);
|
||||||
close_and_invalidate (&write_null);
|
close_and_invalidate (&write_null);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user