OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e70eea4
)
getty needs fd 0 to stay open.
author
Isaac Dunham
<ibid.ag@gmail.com>
Sat, 23 Aug 2014 04:34:52 +0000
(23:34 -0500)
committer
Isaac Dunham
<ibid.ag@gmail.com>
Sat, 23 Aug 2014 04:34:52 +0000
(23:34 -0500)
The O_CLOEXEC reversal resulted in login failing.
toys/pending/getty.c
patch
|
blob
|
history
diff --git
a/toys/pending/getty.c
b/toys/pending/getty.c
index
0cfd750
..
c737628
100644
(file)
--- a/
toys/pending/getty.c
+++ b/
toys/pending/getty.c
@@
-128,7
+128,7
@@
static void open_tty(void)
if ((setsid() < 0) && (getpid() != getsid(0)))
perror_exit("setsid");
xclose(0);
- xopen(TT.tty_name, O_RDWR|O_NDELAY);
+ xopen(TT.tty_name, O_RDWR|O_NDELAY
|O_CLOEXEC
);
fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~O_NONBLOCK); // Block read
dup2(0, 1);
dup2(0, 2);