Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4162: io_service can't be used correctly after fork().
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-02 04:32:36
#4162: io_service can't be used correctly after fork().
----------------------------------+-----------------------------------------
Reporter: artyomtnk@⦠| Owner: chris_kohlhoff
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.42.0 | Severity: Problem
Keywords: asio posix fork unix |
----------------------------------+-----------------------------------------
Comment(by artyomtnk@â¦):
>
> 1. Bind to port.
> 2. dup() acceptor descriptor.
> 3. Destroy io_service.
> 4. Prefork.
> 5. Create new io_service in child.
> 6. acceptor::assign()
>
This was the first thing I thought and tried. But, I allow the library
user to start some
asynchronous actions before fork() at all. For example:
* I allow him to create timers
* I allow hit to post() some handlers to event queue so once the service
is started they would be dispatched.
So the solution of creating new io_service is not quite fits my needs.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4162#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC