Actions
Bug #7382
closedWhen daemons run in parallel, pid files are generated with wrong PID in name
Start date:
05/28/2021
Due date:
% Done:
100%
Estimated time:
To be discussed:
No
Description
Seems PID in filename does not correspond with PID in file.
Updated by Jan Mach almost 3 years ago
- Assignee changed from Rajmund Hruška to Jan Mach
Updated by Jan Mach almost 3 years ago
- Status changed from New to Feedback
- To be discussed changed from No to Yes
I have investigated this and the reason is that the name of the PID file is determined before double detach from terminal, so the PID in the name refers to one of the parent process. Problem is with the daemonization library, it is written to be generally usable and knows nothing about the name generation, it expects name to be given. There are following possible solutions:
- We keep things as they are now. The PID is located inside the PID file, the number in the name is there just for the purpose of uniqueness. This was the original idea, it was never intended to be correct.
- We change the daemonizer to be more active in generating the PID file name. It will receive just the base name and it will append the correct PID and .pid extension to it. It will however become more opinionated and less testable. Unless there will be some kind of option to enforce the given static PID file name, it will stop being deterministic in tests.
Updated by Pavel Kácha almost 3 years ago
The PID in the name of the file is there only to easily ensure the filename to be unique. However, it can be misleading for bystander (admin ). So let's make it hexa to strip its likeness to PID and mitigate the possibility of confusion?
Updated by Jan Mach almost 3 years ago
- Target version changed from Backlog to 2.9
- To be discussed changed from Yes to No
Updated by Jan Mach almost 3 years ago
- Status changed from Feedback to In Progress
Updated by Jan Mach almost 3 years ago
- Status changed from In Progress to In Review
- % Done changed from 90 to 100
Deployed to mentat-alt for observation.
Updated by Pavel Kácha almost 3 years ago
- Status changed from In Review to Closed
Actions