Correct inheritance of stdout by child process on Windows

This commit is contained in:
Brian Nixon 2023-03-27 15:22:52 +01:00 committed by GitHub
parent 587a8ebff9
commit cc5d388c53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -778,7 +778,7 @@ int TASK::run(int argct, char** argvt) {
boinc_resolve_filename_s(stdout_filename.c_str(), stdout_path); boinc_resolve_filename_s(stdout_filename.c_str(), stdout_path);
startup_info.hStdOutput = win_fopen(stdout_path.c_str(), "a"); startup_info.hStdOutput = win_fopen(stdout_path.c_str(), "a");
} else { } else {
startup_info.hStdOutput = (HANDLE)_get_osfhandle(_fileno(stderr)); startup_info.hStdOutput = (HANDLE)_get_osfhandle(_fileno(stdout));
} }
if (stdin_filename != "") { if (stdin_filename != "") {
boinc_resolve_filename_s(stdin_filename.c_str(), stdin_path); boinc_resolve_filename_s(stdin_filename.c_str(), stdin_path);