How to trace a program from its very beginning without running it as root

前端 未结 7 1569
我在风中等你
我在风中等你 2021-02-04 09:44

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, no

7条回答
  •  暖寄归人
    2021-02-04 09:55

    Create a launcher program that will wait for a signal of some sort (not necessarily a literal signal, just an indication that it's ready), then exec() your target. Now dtrace -p the launcher program, and once dtrace is up, let the launcher go.

提交回复
热议问题