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
This code is writing to a non-temporary file with a constant filename in order to capture the exec output. This is not multiprocess/multithreading safe:
There is currently no expectation for the ATF interface to be thread-safe.
But the problem here is not about threads: it's about multiprocessing. It's perfectly reasonable to spawn to subprocess and wait for them with checks, which fails with the current fork/wait interface.
As an easy solution, we can tag the generated file names with the spawned PID. Not completely bug-free if the OS decides to reuse PIDs along the way, but most decent OSs nowadays will avoid immediate PID reuse to prevent certain types of attacks.
Filed from freebsd/kyua#87 by yaneurabeya:
This code is writing to a non-temporary file with a constant filename in order to capture the exec output. This is not multiprocess/multithreading safe:
The text was updated successfully, but these errors were encountered: