mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Remove FD on close.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2207 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
@@ -1228,6 +1228,11 @@ static void fd_chr_read(void *opaque)
|
||||
if (len == 0)
|
||||
return;
|
||||
size = read(s->fd_in, buf, len);
|
||||
if (size == 0) {
|
||||
/* FD has been closed. Remove it from the active list. */
|
||||
qemu_set_fd_handler2(s->fd_in, NULL, NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
if (size > 0) {
|
||||
s->fd_read(s->fd_opaque, buf, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user