chiark / gitweb /
service: add missing pid file unwatch in the destructor
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 19 Jan 2012 22:58:07 +0000 (23:58 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 19 Jan 2012 23:51:56 +0000 (00:51 +0100)
The pid file watch could outlive the service unit if a daemon-reload
request came at the right time. The inotify event would then be
delivered to who knows where.

Fix it by unwatching in the service destructor.

Further changes will be needed to preserve the state of the pid file
watch across daemon-reload. For now let's just fix the crash observed
by Jóhann Guðmundsson:
Assertion 's->state == SERVICE_START || s->state == SERVICE_START_POST'
failed at src/service.c:2609, function service_fd_event().  Aborting

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=783118

No differences found