通过telnet发送到Fedora服务器的Ctrl-Z不会停止该过程 [英] Ctrl-Z sent to Fedora server over telnet does not stop the process
问题描述
目标:
我正在开发一个iOS终端仿真器,用于通过telnet协议访问我的Unix服务器.我正在针对AIX和Fedora Linux进行测试.
I am working on an iOS terminal emulator for accessing my Unix server through the telnet protocol. I am testing against both AIX and Fedora Linux.
问题:
如果我将Ctrl-Z(ASCII 26)发送到AIX服务器,则其行为与预期的一样:我返回了一个stopped programname
之类的字符串,然后我发送的所有其他字符都得到了回显.
If I send Ctrl-Z (ASCII 26) to the AIX server, it behaves as expected: I get back a string like stopped programname
, and then any further characters I send get echoed back.
当我将其发送到Fedora服务器时,直到第二次发送Ctrl-Z时,我都没有回声.该程序在Fedora机器上的Bash下运行.
When I send it to the Fedora server, I get no echo-back until I send Ctrl-Z a second time. The program is running under Bash on the Fedora machine.
为什么我会看到这种行为上的差异?
Why am I seeing this difference in behavior?
推荐答案
您必须拨打2个电话:
-
停止该过程
Stopping that process
kill -SIGSTOP 'pgrep process_name'
继续该过程
kill -SIGCONT 'pgrep process_name'
SIGSTOP告诉进程保持",而SIGCONT告诉进程 从你上次停下来的地方捡起"
SIGSTOP tells a process to "hold on" and SIGCONT tells a process to "pick up where you left off"
看看,是否有帮助.
See, if that help.
这篇关于通过telnet发送到Fedora服务器的Ctrl-Z不会停止该过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!