mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01: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:
parent
86e2b8d427
commit
2b560457a0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user