[SERVER-5727] log rotate() is missing a lot of error checking Created: 30/Apr/12  Updated: 03/Nov/17  Resolved: 03/Nov/17

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: polish
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-8160 The rotateLogs() function doesn't pri... Closed
is duplicated by SERVER-20480 Logrotate fails with no error message... Closed
Operating System: ALL
Participants:

 Description   

The following functions in rotate() need to have their return statuses checked for errors so we don't have confusing behavior when things fail silently:
rename()
CreateFileA()
freopen()
dup2()

If these functions fail, we should write to stderr and translate errno.



 Comments   
Comment by Eric Milkie [ 03/Nov/17 ]

This code went away when we wrote the new RotatableFileWriter.

Generated at Thu Feb 08 03:09:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.