projects
/
platform
/
upstream
/
nsjail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f80318f
)
flush stdin after nsjail ends
author
Robert Swiecki
<robert@swiecki.net>
Sun, 10 Mar 2019 14:00:45 +0000
(15:00 +0100)
committer
Robert Swiecki
<robert@swiecki.net>
Sun, 10 Mar 2019 14:00:45 +0000
(15:00 +0100)
nsjail.cc
patch
|
blob
|
history
diff --git
a/nsjail.cc
b/nsjail.cc
index 0b57033ff6869e039d5320badf5f267b95a41734..720095f75c1ebe4804516469c8d3f37b53877176 100644
(file)
--- a/
nsjail.cc
+++ b/
nsjail.cc
@@
-188,7
+188,10
@@
void setTC(int fd, const struct termios* trm) {
PLOG_W("ioctl(fd=%d, TCSETS) failed", fd);
return;
}
- LOG_D("Restored the previous state of the TTY");
+ if (tcflush(fd, TCIFLUSH) == -1) {
+ PLOG_W("tcflush(fd=%d, TCIFLUSH) failed", fd);
+ return;
+ }
}
} // namespace nsjail