[[email protected] test]# strace -o /tmp/lsof.strace -p 5625
Process 5625 attached - interrupt to quit
q
有人知道吗?如何在连接到进程时退出strace?
[[email protected] test]# strace -o /tmp/lsof.strace -p 5625
Process 5625 attached - interrupt to quit
q
有人知道吗?如何在连接到进程时退出strace?
你试过Ctrl + C吗? 你给命令发送了一个“中断”信号。
我已经通过使用Ctrl + Z将strace发送到后台进程了,然后手动终止strace PID。
+1 bcoz如果'CTRL + C'不杀它,然后这个你应该怎么做。您可能必须使用'kill -9
这似乎发生在进程被阻塞等待不再存在的pid时。
如果您的strace对Ctrl + C没有响应,请使用Ctrl + Z和bg将其推到背景,然后使用另一个strace附加到正在运行的strace进程。这应该告诉你为什么第一个strace被阻止。
# strace -p 32035
Process 32035 attached - interrupt to quit
^Z
# bg
[1]+ strace -p 32035 &
# ps uax|grep strace
root 1886 0.0 0.0 103452 840 pts/2 S+ 05:59 0:00 grep strace
root 30114 0.0 0.0 4452 572 pts/2 S 05:59 0:00 strace -p 32035
# strace -p 30114
Process 30114 attached - interrupt to quit
wait4(-1,
然后,您可以杀死这些进程使用kill -9
'按Ctrl + C'不工作... – compiler 2011-03-28 01:42:35