10 Feb
2016
10 Feb
'16
11:54 a.m.
On 02/10/2016 02:27 AM, Juan Dent wrote:
posix::stream_descriptor stream{ioservice, STDOUT_FILENO};
Here you take over ownership of stdout, so it will be closed by the stream destructor. A quick fix is to pass a copy of the file descriptor with ::dup(STDOUT_FILENO) as shown in the posix_chat_client.cpp example.