When running this, it will print an exception message twice:
$ make test
g++ -g -std=c++17 -o subprocess main.cpp -pthread
./subprocess
exception triggered: execve failed : No such file or directory
exception triggered: execve failed : No such file or directory
The exception appears to be thrown in both the parent and the child process in case of execve failure. This seems like a bug as a result of not exiting the forked process.
Consider the following code:
When running this, it will print an exception message twice:
The exception appears to be thrown in both the parent and the child process in case of
execve
failure. This seems like a bug as a result of not exiting the forked process.