Skip to content

Commit 524cb74

Browse files
committed
get back cleanup it to where it was
1 parent 110e9c3 commit 524cb74

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

scripts/integration.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,7 @@ reflex run --loglevel debug --env "$env_mode" "$@" & pid=$!
2121
# Within the context of this bash, $pid_in_bash is what we need to pass to "kill" on exit
2222
# This is true on all platforms.
2323
pid_in_bash=$pid
24-
cleanup() {
25-
kill -INT $pid_in_bash ||:
26-
# Wait for the process to exit so it releases file locks (important on Windows)
27-
for i in $(seq 1 10); do
28-
kill -0 $pid_in_bash 2>/dev/null || return 0
29-
sleep 1
30-
done
31-
# Force kill if still alive
32-
kill -9 $pid_in_bash 2>/dev/null ||:
33-
sleep 1
34-
}
35-
trap cleanup EXIT
24+
trap "kill -INT $pid_in_bash ||:" EXIT
3625

3726
echo "Started server with PID $pid"
3827

0 commit comments

Comments
 (0)