[英]How to attach to a running shell script?
Is it possible, ie using gdb? 是否可能,即使用gdb? What's needed?
需要什么
12606 ? Ss 0:00 /bin/bash -c /xxx/bin/dispatch.start
12626 ? S 0:00 \_ /bin/bash /xxx/bin/waitpower.sh
13831 ? S 0:00 \_ /bin/sh ./wn-mps1086-generex start
I want to attach to waitpower.sh and see what's happening. 我想附加到waitpower.sh并查看发生了什么。
retty 12626
http://pasky.or.cz/dev/retty/ “ retty是一个微型工具,可让您附加在其他终端上运行的进程。”
您可以使用shell脚本的进程ID附加gdb:
sudo gdb -p pid
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.