mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 00:13:40 +02:00
gspawn: use sane_open() for stdin
sane_open() is used for stdout and stderr, but regular open() was being used for stdin. Spotted by Philip Withnall.
This commit is contained in:
@@ -1258,7 +1258,7 @@ do_exec (gint child_err_report_fd,
|
||||
else if (!child_inherits_stdin)
|
||||
{
|
||||
/* Keep process from blocking on a read of stdin */
|
||||
gint read_null = open ("/dev/null", O_RDONLY);
|
||||
gint read_null = sane_open ("/dev/null", O_RDONLY);
|
||||
g_assert (read_null != -1);
|
||||
sane_dup2 (read_null, 0);
|
||||
close_and_invalidate (&read_null);
|
||||
|
Reference in New Issue
Block a user