projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
707b3ee
)
Avoid (repeatedly) trying to read stdin after it has closed.
author
pbrook
<pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 10 Sep 2006 14:39:54 +0000
(14:39 +0000)
committer
pbrook
<pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 10 Sep 2006 14:39:54 +0000
(14:39 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2156
c046a42c
-6fe2-441c-8c8c-
71466251a162
vl.c
patch
|
blob
|
history
diff --git
a/vl.c
b/vl.c
index 45e9417f211cb8bf306dffc01b3fa1d05059f2a0..d422fedcf0f7c3751ed5593338ba8996dcdaa9e7 100644
(file)
--- a/
vl.c
+++ b/
vl.c
@@
-1417,6
+1417,11
@@
static void stdio_read(void *opaque)
uint8_t buf[1];
size = read(0, buf, 1);
+ if (size == 0) {
+ /* stdin has been closed. Remove it from the active list. */
+ qemu_set_fd_handler2(0, NULL, NULL, NULL, NULL);
+ return;
+ }
if (size > 0)
stdio_received_byte(buf[0]);
}