Skip to content

Commit 651b8c8

Browse files
committed
stop-chromedriver fix
1 parent 3c66d87 commit 651b8c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

commands/stop-chromedriver.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ YELLOW='\033[1;33m'
55

66
printf "${YELLOW}Stopping Chromedriver${NC}\n"
77

8-
pkill chromedriver
8+
for pid in $(pgrep chromedriver); do
9+
if grep -q $(cat /proc/self/cgroup | head -n 1 | cut -d: -f3) /proc/$pid/cgroup; then
10+
kill $pid
11+
fi
12+
done
913

1014
printf "${GREEN}Chromedriver stopped.${NC}\n "
1115

0 commit comments

Comments
 (0)