System: Debian sid, x86_64
Since 0938103, the following program:
#include <iostream>
#include <string>
#include <vector>
#include <boost/process.hpp>
int main() {
std::vector<std::string> args{"/bin/echo", "hello from child"};
boost::process::ipstream out;
auto begin = std::chrono::high_resolution_clock::now();
bool timeout_flag = false;
boost::process::child child(args);
std::error_code ec;
if (!child.wait_for(std::chrono::seconds{10}, ec)) {
timeout_flag = true;
child.terminate(ec);
}
std::cout << "after wait_for" << std::endl;
}
ends up taking 10 seconds to complete, even though the spawned process exits pretty much immediately... except when running under strace or gdb. When I attach gdb to an already running process, I can see that it is blocking in sigtimedwait.