Discussion:
[asio-users] EAGAIN when using async_read_until with posix::stream_descriptor(STDIN_FILENO)
Oleksandr Senkovych
2013-08-09 10:12:05 UTC
Permalink
Hi!
Recently I tried to write an asynchronous command line interface for my
program. I used posix::stream_descriptor with STDIN_FILENO assigned as data
source. Eventually, when I try to async_read_until from this stream, if I
simultaneously write to std::cout after some time I get EAGAIN error.


I wrote a small example that demonstrates this problem:
https://gist.github.com/blackjack/6192600

I'm using gcc 4.7.3, boost ver 1.49.
Any suggestions why it happens and how to fix it?

Loading...