-
-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting stdout_file in non-fork launcher #2127
Conversation
Still needs some work because the field is accessed both in windows and unix code. LibAFL/libafl/src/events/launcher.rs Lines 373 to 377 in b231803
|
yes windows should not access it. it cannot fork |
Couldn't we make this work on Windows/non-fork by just (not) closing the output? |
We'd need to redirect stdout/stderr to the file first, and the way that is currently implemented is by |
I just verified that this now creates the file and writes all output to it, as expected on Linux. Idk, if the |
Neat! :) |
Previously setting the stdout_file in the launcher, while not forking would only result in the stdout being forwarded from the child processes to the parent process, but not written into the specified location.
This PR changes this behaviour to make the parent and all children write into the log file. It also hides the file in non-unix builds. This means, unless debug output is set, on non-unix platforms the stdio from child processes is hidden.
Discovered while debugging #2111