File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 1414fi
1515
1616exit_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
3326rewatch watch & > /dev/null &
You can’t perform that action at this time.
0 commit comments