aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-08-09 23:49:48 -0500
committerRob Landley <rob@landley.net>2014-08-09 23:49:48 -0500
commitb843203842448f144f895f7b4c5b2adb3af69048 (patch)
tree8f7b1deea219ab25513af90ededa09974be0338a /toys/other
parent91b360a42c56997302cd6a6bbb7a820dee67f46e (diff)
downloadtoybox-b843203842448f144f895f7b4c5b2adb3af69048.tar.gz
Disable xopen's default O_CLOEXEC for oneit.
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/oneit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/other/oneit.c b/toys/other/oneit.c
index 5bf4e941..72395cce 100644
--- a/toys/other/oneit.c
+++ b/toys/other/oneit.c
@@ -65,7 +65,8 @@ void oneit_main(void)
setsid();
for (i=0; i<3; i++) {
close(i);
- xopen(TT.console ? TT.console : "/dev/tty0", O_RDWR);
+ // Remember, O_CLOEXEC is backwards for xopen()
+ xopen(TT.console ? TT.console : "/dev/tty0", O_RDWR|O_CLOEXEC);
}
// Can't xexec() here, because we vforked so we don't want to error_exit().