[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_op

From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd.
Date: Wed, 23 Jul 2008 13:18:42 +0100
User-agent: KMail/1.9.9

> >> This changes semantics a bit.  Previously, using a pty would guarantee
> >> that data is always written as qemu_chr_write does not perform any sort
> >> of buffering.
> >>
> >> Now, that data will be silently dropped instead of causing QEMU to
> >> block.  I don't think it's perfectly clear that one behaviour is clearly
> >> better than the other.
> >
> > Then we need both.
> >
> > Add an option to specify non-blocking mode for stdio, pty and pipe in
> > qemu_chr_open.  Blocking mode is used by default (maintaining current
> > semantics), non-blocking mode if the name is prefixed with nonblock:
> Doing that as config option is pusing the problem to the user and a
> quite lame way to address the problem.

I agree. Char devices should never drop data when a user is connected. If we 
can't tell whether a user is connected we should never drop data at all, and 
it's the user's responsibility to ensure data doesn't back up.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]