mortendynamite / g19daemon

Linux daemon for Logitech G19 Keyboard
GNU General Public License v3.0
19 stars 9 forks source link

Unable to restart after application crash #17

Closed Neo-Desktop closed 3 years ago

Neo-Desktop commented 3 years ago

If for whatever reason g19daemon crashes, it leaves behind a PID file in the run directory.

This means it's not possible to relaunch the application without first removing the PID file.

I would propose a change to the startup logic in main.cpp to compensate for this, (i.e. if the file exists and is actively running then exit early, otherwise just remove the PID file and continue startup)

Let me know if you'd prefer this in a pull request

jimmyd-be commented 3 years ago

I will look into it. I have already a sollution in mind that does not need to have the pid file in line. I will develop it asap (begin of the week).

Neo-Desktop commented 3 years ago

Sounds good :) thanks for the prompt response!

jimmyd-be commented 3 years ago

The latest code change has the change for checking a running instance without pid file. Enjoy it.