-
-
Save omar331/656e862ca06349a7d65f47b2697310ec to your computer and use it in GitHub Desktop.
Kill zombie process of firefox during the time that you execute automation test through the selenium web driver and the firefox browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Author: Kenta Togashi | |
INTERVAL=5 | |
COUNT=0 | |
while : | |
do | |
sleep $INTERVAL | |
ZOMBIE_FIREFOX_PID=`ps aux | grep 'firefox' | grep '[-]silent' | awk '{print $2}'` | |
if [ -n "$ZOMBIE_FIREFOX_PID" ];then | |
COUNT=`expr $COUNT + 1` | |
if [ $COUNT -eq 3 ];then | |
kill -9 $ZOMBIE_FIREFOX_PID | |
COUNT=0 | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment