Commit 5918a58d authored by Dave Cooper's avatar Dave Cooper
Browse files

try to respond to kill -15 on PID on in container.

parent 27fb2b4b
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,15 @@

cleanup() {
    echo "Shutting down Gendl daemon..."
    # First try to gracefully terminate gdl-ccl by killing run-gendl-services
    # This breaks stdio connection, causing gdl-ccl to exit naturally
    pkill -TERM -f "run-gendl-services"
    sleep 3
    # Kill any remaining processes in our process tree
    pkill -TERM -P 1
    sleep 2
    # Force kill any stubborn processes
    pkill -KILL -P 1
    exit 0
}