< prev index next >

src/hotspot/share/logging/logFileOutput.cpp

8176717: GC log file handle leaked to child processes
8176809: UL Log file handles leaked to child processes

*** 243,253 **** _file_name, _file_count_max_digits, _current_file); archive(); increment_file_count(); } ! _stream = fopen(_file_name, FileOpenMode); if (_stream == NULL) { errstream->print_cr("Error opening log file '%s': %s", _file_name, strerror(errno)); return false; } --- 243,253 ---- _file_name, _file_count_max_digits, _current_file); archive(); increment_file_count(); } ! _stream = os::fopen_retain(_file_name, FileOpenMode); if (_stream == NULL) { errstream->print_cr("Error opening log file '%s': %s", _file_name, strerror(errno)); return false; } ***************
*** 332,342 **** // Archive the current log file archive(); // Open the active log file using the same stream as before ! _stream = fopen(_file_name, FileOpenMode); if (_stream == NULL) { jio_fprintf(defaultStream::error_stream(), "Could not reopen file '%s' during log rotation (%s).\n", _file_name, os::strerror(errno)); return; } --- 332,342 ---- // Archive the current log file archive(); // Open the active log file using the same stream as before ! _stream = os::fopen_retain(_file_name, FileOpenMode); if (_stream == NULL) { jio_fprintf(defaultStream::error_stream(), "Could not reopen file '%s' during log rotation (%s).\n", _file_name, os::strerror(errno)); return; }
< prev index next >