qemu-devel
[Top][All Lists]
Advanced

[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: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd.
Date: Thu, 24 Jul 2008 16:07:19 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Anthony Liguori wrote:
> >The only guarenteed reliable way I know of is using epoll(), but as I
> >mentioned before that's Linux specific, so not immediately useful unless
> >we're willing to drop in an alternate epoll() based main loop for Linux
> >only, and say other OS have to use PTYs in blocking mode.
> >  
> 
> So far, this sounds like the best option to me.

I'm surprised it works.  You shouldn't be able to get any more
information out of epoll() than poll() - they're supposed to be
exactly equivalent informationally, except for details and performance.

Which suggests to me if it works now, it might get... fixed.

So what are you doing with epoll + pty that works?

Btw, you don't need an epoll main loop.  You can just put the pty into
epoll, and put the _epoll_'s file descriptor into the main loop.
You'll get a ready-to-read when there's a message from epoll.

epoll supports its descriptor being used by other pollers, even
another epoll.

-- Jamie




reply via email to

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