ILD

strace detach process on execve syscall
作者:Yuan Jianpeng 邮箱:yuanjianpeng@xiaomi.com
发布时间:2024-1-11 站点:Inside Linux Development

strace包含子线程,但是不想包含创建的子进程。怎么办呢?


使用-f选项,是会跟踪子进程的。需要使用-b选项

   Tracing

       -b syscall

       --detach-on=syscall

                   If  specified  syscall is reached, detach from traced process.  Currently, only ex‐

                   ecve(2) syscall is supported.  This option is useful if you want  to  trace  multi-

                   threaded process and therefore require -f, but don't want to trace its (potentially

                   very complex) children.



Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.