-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v239.1: PID file not removed when elogind is terminated #94
Comments
The second task, making elogind to actually check the PID file if one is found, is on my TODO list. |
Checking the PID in the PID file doesn't sound safe - what if it's coincidentially the same as it was in the previous boot (f.e. a deterministic boot process could easily make that happen every time). Better would be not to use a pid file but something else. Doesn't elogind provide a dbus service? How come it's not enough to try to register the dbus service and if that doesn't work (because it's already there), fail? |
Well, elogind checks the presence of a PID file, before it would create its own.
Unfortunately service managers like OpenRC need such a PID file to know where to send SIGTERM when shuting down the device. |
Would openrc do if elogind service was supervised? |
Sven, I think the fix in 59e70b3 has an error. See `https://bugs.debian.org/916212. The attached patch fixes it for me Mark |
@markhindley : Yes, you are right. |
The function accidently returned the found pid, if it didn't belong to a running process. Bug: #94 Signed-Off-By: Sven Eden <sven.eden@prydeworx.com>
* remove duplicate comment * remove empty tabs and blank lines * move macros and globals ontop * comment to seprate function implementation * fix alignment * switch to *argv[] similar to other suckless code * kill all empty last lines * append comment to endif * reuse existing ARRLEN macro * comment fall through * use while (true) everywhere Co-authored-by: NRK <nrk@disroot.org>
I got an e-mail from Stefan about elogind not removing its PID file if it is shutdown using signal 15 (SIGTERM).
As /run is on tmpfs nowadays, this is of no real concern if elogind crashes on reboot or if the whole machine comes down. However, not all systems are like that and some have not put /run into RAM.
On these systems elogind fails to start on next reboot if a stale PID file exists.
There are two reasons for this:
Stefan has already provided fixes for the 1st point, which I am currently testing.
The second point will be tackled thereafter.
The text was updated successfully, but these errors were encountered: