RFR: 8146879: Truncate new UL log files
marcus.larsson at oracle.com
Fri Jan 15 13:22:53 UTC 2016
On 01/15/2016 08:52 AM, Marcus Larsson wrote:
> On 01/14/2016 04:28 PM, Dmitry Samersoff wrote:
>> fopen(name, "wa+") truncate file before open it in append mode.
> Ah, didn't know you could do that. If it works that would be much
> better, I'll give it a shot.
Unfortunately this doesn't work on all platforms. Windows fails to open
files in this mode, so I'm guessing it's some GCC extension we can't use.
>> On 2016-01-14 18:00, Marcus Larsson wrote:
>>> Please review the following patch to make sure UL truncates existing
>>> files before writing to them. Since files are opened in append mode,
>>> truncation isn't done automatically, so instead the patch adds an
>>> attempt to remove the log file before opening it.
>>> Included test through JPRT
More information about the hotspot-runtime-dev