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

Do not close stdout and stderr
This commit is contained in:
Tatsuhiro Tsujikawa
2023-09-18 18:17:19 +09:00
committed by GitHub

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;