Merge pull request #2107 from aria2/dont-close-stderr-stdout

Do not close stdout and stderr
pull/2117/head
Tatsuhiro Tsujikawa 2023-09-18 18:17:19 +09:00 committed by GitHub
commit d53735bf49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ int BufferedFile::onClose()
#else // __MINGW32__
_commit(fileno(fp_));
#endif // __MINGW32__
rv = fclose(fp_);
if (fp_ != stdin && fp_ != stderr) {
rv = fclose(fp_);
}
fp_ = nullptr;
}
return rv;