Skip to content

Instantly share code, notes, and snippets.

@jstoone
Last active April 11, 2024 07:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstoone/c7b5a37dedc7cd2bab3696ca387e85f0 to your computer and use it in GitHub Desktop.
Save jstoone/c7b5a37dedc7cd2bab3696ca387e85f0 to your computer and use it in GitHub Desktop.
Kill WebKit.WebContent on Simulator
#/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