Opened 7 years ago
Last modified 7 years ago
#11448 new Bugs
posix::stream_descriptor with ::dup(STDIN_FILENO) as in sample posix chat client kills shell on Solaris 11.2
Reported by: | Owned by: | chris_kohlhoff | |
---|---|---|---|
Milestone: | To Be Determined | Component: | asio |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
If you build boost_1_58_0/libs/asio/example/cpp03/chat/posix_chat_client.cpp on Solaris 11.2 and run it, it immediately terminates. Unfortunately it terminates also the running shell which startet posix_chat_client.
It is not important whether you compile with gcc or Sun CC. The behavior is always the same.
It you redirect the input from a file (posix_chat_client < some-file) or pipe data to it, everything works. The shell persists.
If you disable /dev/poll for Boost::Asio (macro via command line at compilation -DBOOST_ASIO_DISABLE_DEV_POLL) the program runs and accepts inputs. As soon as you terminate the chat client the shell terminates, too.
The problem seems to be the initialization of boost::asio::posix::stream_descriptor input_ in class posix_chat_client: input_(io_service, ::dup(STDIN_FILENO))
Change History (2)
comment:1 by , 7 years ago
Summary: | sample posix chat client kills shell on Solaris 11.2 → posix::stream_descriptor with ::dup(STDIN_FILENO) as in sample posix chat client kills shell on Solaris 11.2 |
---|
comment:2 by , 7 years ago
Component: | None → asio |
---|---|
Owner: | set to |