Last active
October 14, 2022 07:52
-
-
Save cekstam/f7ecbc0edf116adafb0401424af6ee75 to your computer and use it in GitHub Desktop.
Bash loop for attaching strace to a not yet created process
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
while true; do pid=$(pgrep 'httpd' | head -1); if [[ -n "$pid" ]]; then sudo strace -s 2000 -vvtf -p "$pid" ; break; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment