service: use recorded state to check whether we can track child process
authorDavin McCall <davmac@davmac.org>
Mon, 26 Jun 2017 17:58:03 +0000 (18:58 +0100)
committerDavin McCall <davmac@davmac.org>
Mon, 26 Jun 2017 17:58:03 +0000 (18:58 +0100)
commit05f1ad25b8effdf7497ccc4f3d95cb15a035f0b8
tree4a7ed4cf6472dfa2adb4866d9f3fb6f4e07ac8e0
parentc6446032ba13cfea4fbcae1ddf2fefb2dc8b30bd
service: use recorded state to check whether we can track child process

We have a flag which records whether we are tracking the child process.
A BGPROCESS service can't always track the child, so it stops once the
dependencies have stopped without waiting for the process. Previously we
did a manual check rather than using the existing flag to see whether
the process could be tracked before immediately stopping.
src/service.cc
src/service.h