Skip to content

Commit 25f3ef9

Browse files
committed
Silent kill for CL7/8 and Ubuntu for tests
1 parent fe4e916 commit 25f3ef9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

end-to-end-test.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ EOF
316316
if [ ${keep} -eq 0 ]
317317
then
318318
pid=$(cat "${tmpdir}/node_exporter.pid")
319-
kill "$pid"
319+
# Disown to prevent shell from printing "Terminated" message
320+
disown "$pid" 2>/dev/null || true
321+
kill "$pid" 2>/dev/null || true
320322
# Wait for the process to exit gracefully to allow socket cleanup
321323
for i in {1..100}; do
322324
if ! kill -0 "$pid" 2>/dev/null; then
@@ -327,9 +329,6 @@ EOF
327329
# Force kill if it's still running
328330
kill -9 "$pid" 2>/dev/null || true
329331

330-
# This silences the "Killed" message
331-
set +e
332-
wait "$pid" > /dev/null 2>&1
333332
rc=0
334333
if [ ${socket} -ne 0 ]; then
335334
if ls -l "${unix_socket}" &> /dev/null; then

0 commit comments

Comments
 (0)