Created
May 2, 2017 04:32
-
-
Save jen20/60d9d9b9c75cd2611998e1a1e2605b9e to your computer and use it in GitHub Desktop.
Trace all args to `ld` and `gcc`. Probably SmartOS only.
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/sbin/dtrace -ws | |
#pragma D option quiet | |
#pragma D option switchrate=10 | |
syscall::exec*:return | |
/ execname == "ld" || execname == "gcc"/ | |
{ | |
stop(); | |
system("pargs %d", pid); | |
system("prun %d", pid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment