Last active
April 11, 2024 07:41
-
-
Save jstoone/c7b5a37dedc7cd2bab3696ca387e85f0 to your computer and use it in GitHub Desktop.
Kill WebKit.WebContent on Simulator
This file contains hidden or 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
#/bin/bash | |
# Find process with name containing 'launchd_sim' | |
SIMULATOR_PID=$(pgrep launchd_sim) | |
echo "Simulator PID: $SIMULATOR_PID" | |
# Find sub-processes for the app's WebViews | |
WEBKIT_CONTENT_PID=$(pgrep -P $SIMULATOR_PID 'com.apple.WebKit.WebContent') | |
echo "WebKit WebContent PID(s):" | |
echo $WEBKIT_CONTENT_PID | |
# Send kill signal to the selected processes. | |
kill $WEBKIT_CONTENT_PID | |
echo "WebContent processes terminated." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment