projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91b360a
)
Disable xopen's default O_CLOEXEC for oneit.
author
Rob Landley
<rob@landley.net>
Sun, 10 Aug 2014 04:49:48 +0000
(23:49 -0500)
committer
Rob Landley
<rob@landley.net>
Sun, 10 Aug 2014 04:49:48 +0000
(23:49 -0500)
toys/other/oneit.c
patch
|
blob
|
history
diff --git
a/toys/other/oneit.c
b/toys/other/oneit.c
index
5bf4e94
..
72395cc
100644
(file)
--- 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().