daemonized pid file problem
hi kaliko, i've encountered the following problems when trying to daemonize with a pid file set in .config : when there is no pid file, i get the following error
Error trying to write pid file: [Errno 2] No such file or directory: '.local/share/mpd_sima/mpd-sima.pid'
when i touch the pid file, it forks and then in the logs i get this :
2022-10-17 20:28:29 INFO : Starting (0.18.1)...
2022-10-17 20:28:29 INFO : Loading internal plugin: Lastfm (last.fm similar artists)
2022-10-17 20:28:29 INFO : Lastfm: Initialising cache!
2022-10-17 20:28:29 INFO : plugins loaded, prioriy: Lastfm
2022-10-17 20:28:29 INFO : Daemonize process...
2022-10-17 20:28:29 ERROR : Unhandled Exception!!!
2022-10-17 20:28:29 ERROR : Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/sima/launch.py", line 184, in run
start(sopt, restart)
File "/usr/lib/python3.10/site-packages/sima/launch.py", line 167, in start
sima.start()
File "/usr/lib/python3.10/site-packages/sima/lib/daemon.py", line 153, in start
pid = int(pf.read().strip())
ValueError: invalid literal for int() with base 10: ''
2022-10-17 20:28:29 INFO : musicpd python module version: 0.7.0
2022-10-17 20:28:29 INFO : MPD_sima version: 0.18.1
2022-10-17 20:28:29 INFO : Please report the previous message along with some log entries right before the crash.
2022-10-17 20:28:29 INFO : thanks for your help :)
2022-10-17 20:28:29 INFO : Quiting now!
Only when i run mpd-sima without -d option, the pid file gets created and when i send it kill -2 pid the pid-file disappears again (which is the correct behaviour).
Cheers !