id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4162,io_service can't be used correctly after fork().,artyomtnk@…,chris_kohlhoff,"Hello, I'm trying to run standard ""prefork"" unix configuration with boost-asio. I have following setup: 1. I bind to some port. 2. I prefork several processes. 3. As new connection is avalible one of processes accept it and run the main loop. --------------------- Issue: The io_service is created at the begging and creates eventfd (or pipe), and unlike devpoll, kqueue or epoll it is shared between forked processes. --------------------- There is the problem: When one thread in process try to ""post"" something to event loop it interrupts the select with evenfd... And accidentially other process may actually receive this notification and wake up when the main process that should receive notification does not. --------------------- In short If io_service was created before fork(), post() member function would not work correctly. --------------------- Solutions: 1) Postpone creation of pipe/eventfd to the stage when run() is called instead of construction of io_service. 2) Reopen interrupter if fork() was called. ",Feature Requests,closed,To Be Determined,asio,Boost 1.42.0,Problem,fixed,asio posix fork unix,