我有一个在远程机器上运行的程序,它希望从父代接收SIGINT.该程序需要接收该信号才能正常运行.不幸的是,如果我通过SSH远程运行该进程并发送SIGINT,则ssh进程本身会捕获并中断而不是转发信号.
以下是使用GDB的此行为的示例:
在本地运行:
$ gdb GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009) ... This GDB was configured as "x86_64-apple-darwin". ^C (gdb) Quit ^C (gdb) Quit ^C (gdb) Quit
远程运行:
$ ssh foo.bar.com gdb GNU gdb Red Hat Linux (6.3.0.0-1.159.el4rh) ... This GDB was configured as "i386-redhat-linux-gnu". (gdb) ^C Killed by signal 2. $
任何人都可以建议一种解决这个问题的方法吗?本地ssh客户端是OpenSSH_5.2p1.
$ ssh -t foo.bar.com gdb ... (gdb) ^C Quit