Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 456a012

Browse files
committedMay 5, 2025·
make it work?
1 parent d497bec commit 456a012

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed
 

‎rewatch/tests/lock.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,13 @@ else
1414
fi
1515

1616
exit_watcher() {
17-
# Try to find parent process, if not found just kill the process directly
18-
# PARENT_PROCS=$(pgrep -P $!)
19-
# if [ -n "$PARENT_PROCS" ]; then
20-
# kill $PARENT_PROCS &>/dev/null
21-
# fi
22-
# for if it's the node script that runs rewatch also kill the child processes
17+
# Try to find child process, if not found just kill the process directly
2318
CHILD_PROCS=$(pgrep -f rewatch)
2419
if [ -n "$CHILD_PROCS" ]; then
25-
kill $! &>/dev/null
2620
kill $CHILD_PROCS &>/dev/null
27-
else
28-
# Last resort: just kill the background process
29-
kill $!
3021
fi
22+
# for if it's the node script that runs rewatch also kill the child processes
23+
kill $!
3124
}
3225

3326
rewatch watch &>/dev/null &

0 commit comments

Comments
 (0)
Please sign in to comment.