procd: copy the respawn property of new instance
authorYashavanth Chowrikoppalu <yashavanth.hsn@gmail.com>
Wed, 17 Apr 2019 13:21:18 +0000 (15:21 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 18 Apr 2019 21:01:35 +0000 (23:01 +0200)
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>
service/instance.c

index 3512f66b313c89f40fd293921327d0273ee2725d..ac96f7df9b3bf7078d77a0e208f99ae1343ba73a 100644 (file)
@@ -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;