How to trace a program from its very beginning without running it as root
I'm writing a tool that calls through to DTrace to trace the program that the user specifies. If my tool uses dtrace -c to run the program as a subprocess of DTrace, not only can I not pass any arguments to the program, but the program runs with all the privileges of DTrace—that is, as root (I'm on Mac OS X). This makes certain things that should work break, and obviously makes a great many things that shouldn't work possible. The other solution I know of is to start the program myself, pause it by sending it SIGSTOP , pass its PID to dtrace -p , then continue it by sending it SIGCONT . The