procd: instance: Support deleting stopped instances
authorKristian Evensen <kristian.evensen@gmail.com>
Sat, 6 Apr 2019 12:28:30 +0000 (14:28 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Sun, 7 Apr 2019 19:20:55 +0000 (21:20 +0200)
commitbaaf38c5e540b23ba086d94743de860b60c37161
tree5a14ec33c6d9d74cac6e0dec3576ff6173ca4114
parentd876d1ca221112674a7e9a6ba0fee65b947fdfa7
procd: instance: Support deleting stopped instances

procd currently does not support deleting a stopped instance. The reason
is that we return in instance_stop(), if pending is set to false. This
patch adds a new function, instance_delete(), which does the necessary
clean-up of an instance. instance_delete() is called before we return in
instance_stop(), as well as when a process that should not be restarted
has exited in instance_exit().

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
service/instance.c