You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I faced with the problem that my process hangs up while it uses wait_until() of child::process. So I watched boost code and find that boost::process::child::wait_until is not thread-safe
struct signal_interceptor_t is used for setting custom reaction on signal with using system ::signal. So handler_func is a new handler and sigchld_handler is setting for previous handler
The problem is that signal handler - atribut of the process, not thread, so if the next thread call ::signal then sigchld_handler is setting for handler_func
Which thread will be used for handle signal is undefined. So thread with sigchld_handler==handler_func can be used! And this cause infinite loop
You can face with the problem in this code, which uses problem part of wait_until. (On my system signals are handled by main thread). Also attach out of the programm bug_wait_until.cpp.txt out.txt
So can you update your documentation with this note please?
The text was updated successfully, but these errors were encountered:
AlexeyZaharov
changed the title
[Linux] boost::process::child::wait_until is not thread-safe
[Linux] boost::process:: child ::wait_until is not thread-safe
Oct 29, 2023
Hi! I faced with the problem that my process hangs up while it uses wait_until() of child::process. So I watched boost code and find that boost::process::child::wait_until is not thread-safe
bug_wait_until.cpp.txt
out.txt
So can you update your documentation with this note please?
The text was updated successfully, but these errors were encountered: