chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.98k stars 1.22k forks source link

fork dead lock #1503

Open jean-christophe81 opened 4 months ago

jean-christophe81 commented 4 months ago

Hello, I'm using boost::process::v2 on Windows and linux (alma and debian) in a multithread process. When the child process calls notify_fork and tries to lock registered_descriptorsmutex (epoll_reactor.ipp:130), registered_descriptorsmutex is already locked by another thread of parent process.

In my mind, I think that when parent process forks, another thread has locked registered_descriptorsmutex and child process has started with registered_descriptorsmutex already locked.

Have you a workaround?

Thanks

Jean Christophe