1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

service: remove pidfile after exit of a service

This commit is contained in:
Lukas Nykryn 2013-08-28 19:27:44 +02:00 committed by Lennart Poettering
parent 5ca8c5d977
commit 9285c9ff26
2 changed files with 6 additions and 2 deletions

2
TODO
View File

@ -60,8 +60,6 @@ Features:
* better error message if you run systemctl without systemd running
* unlink PID files of units after exit
* tiny tool that saves/restores backlight
* systemctl status output should should include list of triggering units and their status

View File

@ -1957,6 +1957,12 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart)
/* we want fresh tmpdirs in case service is started again immediately */
exec_context_tmp_dirs_done(&s->exec_context);
/* Try to delete the pid file. At this point it will be
* out-of-date, and some software might be confused by it, so
* let's remove it. */
if (s->pid_file)
unlink_noerrno(s->pid_file);
return;
fail: