[SERVER-5868] Should consolidate to a single implementation of main() Created: 17/May/12  Updated: 25/Oct/21  Resolved: 25/Oct/21

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

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-5520 Shutdown rewrite (tracking ticket) Closed
Participants:

 Description   

As part of SERVER-5520, we should get down to a single implementation of main() that never returns, but calls _exit(), instead, as part of a move toward not executing static destructors.

Basically, we'd have a generic main:
int main(...) {
initMongoOrDie();
int returnCode = mongoMain(argc, argv);
_exit(returnCode);
}

And then programs would implement their own mongoMain().



 Comments   
Comment by Andy Schwerin [ 25/Oct/21 ]

The shutdown path still needs some cleanup, but this ticket is no longer relevant. After 9 years, theĀ 

Comment by Geert Bosch [ 25/Oct/21 ]

schwerin, benety.goh Now that SERVER-5520 is resolved, is there anything to do here or can we just close this?

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