summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYashavanth Chowrikoppalu <yashavanth.hsn@gmail.com>2019-04-17 15:21:18 +0200
committerHans Dedecker <dedeckeh@gmail.com>2019-04-18 23:01:35 +0200
commita30a8fdced45b79bae12662caf68ffb8597858b3 (patch)
tree6742fd291cf3c17188495cb121a37cee2ae24c25
parentbaaf38c5e540b23ba086d94743de860b60c37161 (diff)
downloadprocd-a30a8fdced45b79bae12662caf68ffb8597858b3.tar.gz
procd: copy the respawn property of new instance
On updating an existing instance, the respawn property is reset in instance_stop(). Subsequent instance_update() call does not copy the respawn property from new instance in instance_config_move(). As a result, the respawning does not happen, if the process is killed externally. Signed-off-by: Yashavanth Chowrikoppalu <Yashavanth.hsn@gmail.com>
-rw-r--r--service/instance.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/service/instance.c b/service/instance.c
index 3512f66..ac96f7d 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -967,6 +967,7 @@ instance_config_move(struct service_instance *in, struct service_instance *in_sr
in->trigger = in_src->trigger;
in->command = in_src->command;
in->pidfile = in_src->pidfile;
+ in->respawn = in_src->respawn;
in->respawn_retry = in_src->respawn_retry;
in->respawn_threshold = in_src->respawn_threshold;
in->respawn_timeout = in_src->respawn_timeout;