From b24bf2c4c42e6f135d5f4b8e5faf1ff5e392aa69 Mon Sep 17 00:00:00 2001 From: "Dave Musicant (home machine)" Date: Sun, 4 Dec 2022 10:39:29 -0600 Subject: [PATCH] yet another attempt --- othertests/startup-shutdown.bash | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/othertests/startup-shutdown.bash b/othertests/startup-shutdown.bash index d8af688..9fa14b0 100755 --- a/othertests/startup-shutdown.bash +++ b/othertests/startup-shutdown.bash @@ -19,17 +19,6 @@ setup() { git clone -q ../remote } -function close_non_std_fds() { - local open_fds non_std_fds=() - get_open_fds - for fd in "${open_fds[@]}"; do - if [[ $fd -gt 2 ]]; then - non_std_fds+=("$fd") - fi - done - close_fds "${non_std_fds[@]}" -} - teardown() { echo '# Teardown started' >&3 # Remove testing directories @@ -39,6 +28,11 @@ teardown() { # rm -rf $testdir echo "Process id again $GITWATCH_PID" >&3 + + # Try killing background process + kill -9 %1 + fg + # Make sure gitwatch script gets killed if script stopped background # Also make sure to kill fswatch if on Mac killall fswatch