Strengthen plain stop wrappers
The prompts used to arrive at this change since the previous commit User reported that the stop_mailcat script does not stop mailcat. Any special observations that may be relevant for version management for this version. Be brief. Plain-mode stop_mailcat.sh and stop_web.sh now wait longer after SIGTERM and fall back to SIGKILL. verplaats_log.json and plan.md were left unstaged.
This commit is contained in:
+32
-6
@@ -184,10 +184,23 @@ fi
|
||||
|
||||
if kill -0 "\$pid" 2>/dev/null; then
|
||||
kill "\$pid"
|
||||
sleep 2
|
||||
timeout=20
|
||||
while [ "\$timeout" -gt 0 ] && kill -0 "\$pid" 2>/dev/null; do
|
||||
sleep 1
|
||||
timeout=\$((timeout - 1))
|
||||
done
|
||||
if kill -0 "\$pid" 2>/dev/null; then
|
||||
echo "mailcat still running after SIGTERM: \$pid"
|
||||
exit 1
|
||||
echo "mailcat still running after SIGTERM, sending SIGKILL: \$pid"
|
||||
kill -KILL "\$pid" 2>/dev/null || true
|
||||
timeout=5
|
||||
while [ "\$timeout" -gt 0 ] && kill -0 "\$pid" 2>/dev/null; do
|
||||
sleep 1
|
||||
timeout=\$((timeout - 1))
|
||||
done
|
||||
if kill -0 "\$pid" 2>/dev/null; then
|
||||
echo "mailcat still running after SIGKILL: \$pid"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
"\$RM" -f "\$PID_FILE"
|
||||
@@ -286,10 +299,23 @@ fi
|
||||
|
||||
if kill -0 "\$pid" 2>/dev/null; then
|
||||
kill "\$pid"
|
||||
sleep 2
|
||||
timeout=20
|
||||
while [ "\$timeout" -gt 0 ] && kill -0 "\$pid" 2>/dev/null; do
|
||||
sleep 1
|
||||
timeout=\$((timeout - 1))
|
||||
done
|
||||
if kill -0 "\$pid" 2>/dev/null; then
|
||||
echo "mailcat web still running after SIGTERM: \$pid"
|
||||
exit 1
|
||||
echo "mailcat web still running after SIGTERM, sending SIGKILL: \$pid"
|
||||
kill -KILL "\$pid" 2>/dev/null || true
|
||||
timeout=5
|
||||
while [ "\$timeout" -gt 0 ] && kill -0 "\$pid" 2>/dev/null; do
|
||||
sleep 1
|
||||
timeout=\$((timeout - 1))
|
||||
done
|
||||
if kill -0 "\$pid" 2>/dev/null; then
|
||||
echo "mailcat web still running after SIGKILL: \$pid"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
"\$RM" -f "\$WEB_PID_FILE"
|
||||
|
||||
Reference in New Issue
Block a user