[SERVER-4523] PID file should be removed on shutdown Created: 19/Dec/11  Updated: 15/Feb/12  Resolved: 31/Jan/12

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

Type: Improvement Priority: Minor - P4
Reporter: Brandon Diamond Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Currently, the pid file is simply cleared out (but not removed). It should be removed altogether.

To avoid any potential misunderstanding: note that the lock file should continue to use the clear-not-remove logic to avoid a fs race condition. This ticket only concerns the pid file.



 Comments   
Comment by Michael A. Fiedler [ 15/Feb/12 ]

To further elaborate, the mongod.lock file may contain the pid, but should not be used by scripts.
More on the lock file can be seen here: http://www.mongodb.org/display/DOCS/Durability+and+Repair#DurabilityandRepair-%7B%7Bmongod.lock%7D%7D

If a pid file is desired, configure the full file location via the "--pidfilepath" argument. Examples of a Debian init.d script can be seen here: https://github.com/mongodb/mongo/blob/master/debian/init.d

Comment by Eliot Horowitz (Inactive) [ 31/Jan/12 ]

it is wiped out, and not removed on purpose

Comment by Dominik Gehl [ 31/Jan/12 ]

To my understanding the PID is inside the lock file (mongod.lock). Isn't that the case ?

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