summaryrefslogtreecommitdiff
path: root/nbd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-04-19 17:32:07 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-22 08:52:20 -0500
commit85a67692d04e15a6b7d5a0e2b9d573d8bffbe108 (patch)
tree360f1f11fd3c5a4f589bd273aa51e7b0d1c81587 /nbd.c
parent910b63682ea72f34307b8797c4cc81a1f2a0c47f (diff)
downloadqemu-85a67692d04e15a6b7d5a0e2b9d573d8bffbe108.tar.gz
qemu-char: simplify pty polling
There is no need to use a timer and pty_chr_read to detect a connected pty. It is simpler to just call g_poll periodically and check for POLLHUP. It is done once per second, and only if the pty is disconnected, so it is cheap enough. Tested with "-monitor pty" and "-serial mon:pty", both of which work correctly and do not freeze QEMU. (How to test ptys? "socat -,raw,echo=0 /dev/pts/4,raw"). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366385529-10329-3-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'nbd.c')
0 files changed, 0 insertions, 0 deletions