[glib: 6/7] gspawn: use sane_open() for stdin
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/7] gspawn: use sane_open() for stdin
- Date: Thu, 21 Jun 2018 17:12:23 +0000 (UTC)
commit 2b560457a0867639ceab8d04490e0ef902470799
Author: Daniel Drake <drake endlessm com>
Date: Wed Jun 13 13:45:47 2018 -0600
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.
glib/gspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gspawn.c b/glib/gspawn.c
index 37f7cd34b..4fe60a584 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]