Skip to main content

How to Interrupt a Host Process from Anzio

Introduction

Several factors come into play including what the terminal emulation program (AnzioWin or Anzio Lite) sends out, what the host end responds to and, if you are using an application, how the host application might react.

There are times when you need to interrupt a host process or send a "BREAK" from Anzio to the host in order for the host to interrupt a running application or script.

On the host end, your terminal type and your current "stty" settings for the person logged in, determine how to respond to special keystrokes and to the client, Anzio, sending interrupt signals to the host.

From Anzio

From within AnzioWin or Anzio Lite, you can do one of three things that may interrupt or suspend a running process:

ctrl-s
By pressing this key combination when the host is scrolling information, you can usually suspend the terminal session temporarily.

ctrl-c, ctrl-d, Delete, Backspace, ...
By pressing some key or key combination, such as a Ctrl-c or Ctrl-d, or by pressing the "Delete" key or the "Backspace" key, you can send a signal to the host that interrupts or discontinues a running process.

Sending a BREAK
By sending the host system a "BREAK", you can often interrupt or discontinue a running process.

How the host responds

It is possible to have the host set to not respond to any interrupts, to not respond to a BREAK and to ignore other special keys for the logged in user. These capabilities are usually set on or off by the user's login script or by some global login or profile script. Check with your system administrator for more information on what will and will not work.

On top of these, it is also possible that the currently running scripts, shell programs and application may preclude certain interrupt signals and ignore certain keystrokes. Check with your application vendor for more information on what does work under what circumstances.

ctrl-s
When the host service monitoring terminal sessions sees a ctrl-s, the host normally pauses output at that time, temporarily, until it sees another ctrl-s or some other keystroke. This is being done at the host and does NOT normally discontinue or halt the program running, it merely suspends output (Anzio does not get involved other than to send the keystrokes through).

Other special keystrokes
When a host script, program or application sees certain keystrokes, it may respond to these with specific actions. Also it is possible for certain keystrokes to be set at the operating system and shell level, to cause interrupt signals to be fired.

BREAK
"Break" is a standard part of the serial, telnet and SSH protocols, but is still dependent on the various host settings for the person logged in, including settings for the "stty" behavior.

When Anzio is connected over a serial connection and issues a "break", it drops the TD (transmit data) line down for 200ms. The host should then react to this as a signal break unless the "stty" option has been disabled. On UNIX, this is determined by the "stty brkint" value.

How the application responds

Applications will receive most the keystrokes mentioned above, but it is up to them to respond accordingly. A ctrl-s is perhaps the only setting that MAY be captured by your "stty" settings prior to the application receiving it (depending on your current terminal type and "stty" settings).

Likewise, if the host operating system and the user's shell settings are allowing interrupt signals to be passed through, then it is up to the host application to react or not react to these. In many cases, host applications actually turn off these settings and ignore taking any action.

Check with your host application vendor for more information on what does and does not work.

Copyright © 2021 Rasmussen Software, Inc. Legal Information & Privacy Policy
Send comments and suggestions to rsi@anzio.com