diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-28 18:55:32 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-28 18:55:32 +0000 |
commit | 279e694bc7bae106dc1178e7fbb60dfb832396e7 (patch) | |
tree | 712f72d4b40f8b1c59eb101cb6ca09ee85f960d7 /hw/usb-uhci.c | |
parent | 4a40e23194e6a6f6d4f8e7f0189e2cde2c0e517f (diff) |
Attempt to detect unconnected ptys (Gerd Hoffman)
This patch moves the pty char device imlementation away from the generic
filehandle code. It tries to detect as good as possible whenever there
is someone connected to the slave pty device and only send data down the
road in case someone is listening. Unfortunaly we have to poll via
timer once in a while to check the status because we have to use read()
on the master pty to figure the status (returns -EIO when unconnected).
Poll intervall for an idle guest is one second, when the guest sends
data to the virtual device linked to the pty we check more frequently.
The point for all of this is to avoid qemu blocking and not responding
any more. Writing to the master pty handle succeeds even when nobody is
connected to (and reading from) to the slave end of the pty. The kernel
just bufferes the writes. And as soon as the kernel buffer is full the
write() call blocks forever ...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4956 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-uhci.c')
0 files changed, 0 insertions, 0 deletions