mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
service: remove pidfile after exit of a service
This commit is contained in:
parent
5ca8c5d977
commit
9285c9ff26
2
TODO
2
TODO
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user