summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-02-12 22:02:48 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-02-12 22:02:48 +0100
commit82ba3e6771d3b8eeea24a732f3042e88170bf6b7 (patch)
tree9705c5314deeda1ddf61aab875d567ec443a9d52
parent89b507932eeab9754d6a464a8ca7bde4815ac18a (diff)
downloadrvnit-82ba3e6771d3b8eeea24a732f3042e88170bf6b7.tar.gz
rvnit-82ba3e6771d3b8eeea24a732f3042e88170bf6b7.tar.xz
rvnit-82ba3e6771d3b8eeea24a732f3042e88170bf6b7.zip
consistently send SIGCONT after SIGTERM, to work for stopped processes
-rw-r--r--rvnit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/rvnit.c b/rvnit.c
index ecf56ec..b477c38 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -925,8 +925,10 @@ cont1:
 					    services[i].pid == 0)
 						restart(i);
 					if (services[i].state == DOWN &&
-					    services[i].pid > 0)
+					    services[i].pid > 0) {
 						kill(services[i].pid, SIGTERM);
+						kill(services[i].pid, SIGCONT);
+					}
 				}
 			}
 			for (i = 0; i < MAX_SV; i++) {
@@ -935,8 +937,10 @@ cont1:
 					    services[i].pid == 0)
 						restart(i);
 					if (services[i].state == DOWN &&
-					    services[i].pid > 0)
+					    services[i].pid > 0) {
 						kill(services[i].pid, SIGTERM);
+						kill(services[i].pid, SIGCONT);
+					}
 				}
 			}
 			for (i = 0; i < MAX_SV; i++) {
@@ -947,6 +951,7 @@ cont1:
 					if (services[i].state == DOWN &&
 					    services[i].pid > 0) {
 						kill(services[i].pid, SIGTERM);
+						kill(services[i].pid, SIGCONT);
 						use_global_log = 0;
 						LOG("disabling global logger %s", services[i].name);
 					}