[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling

2010-04-06 Thread Amit Shah
On (Tue) Apr 06 2010 [10:17:12], Gerd Hoffmann wrote: >> So you mean just return -EAGAIN in case write returns with -EAGAIN? >> >> Yeah, makes sense. > > Yes. > > Note that for EINTR you want re-enter write() through so callers don't > have to worry about signals. Yes, of course.

[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling

2010-04-06 Thread Gerd Hoffmann
So you mean just return -EAGAIN in case write returns with -EAGAIN? Yeah, makes sense. Yes. Note that for EINTR you want re-enter write() through so callers don't have to worry about signals. cheers, Gerd

[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling

2010-04-06 Thread Amit Shah
On (Tue) Apr 06 2010 [09:36:17], Gerd Hoffmann wrote: > Hi, > >> In case of EAGAIN, the unix_write() function just kept spinning while >> attempting to write to the chardev till it succeeded. This resulted in >> a stuck VM in case a chardev had opened connection but wasn't reading >> anything fro

[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling

2010-04-06 Thread Gerd Hoffmann
Hi, In case of EAGAIN, the unix_write() function just kept spinning while attempting to write to the chardev till it succeeded. This resulted in a stuck VM in case a chardev had opened connection but wasn't reading anything from qemu. It spins only for non-blocking file handles. In blocking