Georgia SoftWorks 

Home Contact Us Downloads Documentation Order/Pricing Registration

The Fastest Most Robust SSH2 / Telnet Server Available for Windows NT,  Windows XP, Windows VISTA, Windows 2000, and Windows 2003

Whats New
Features
Session Shadowing
Remote Admin.
Legacy Apps.
FAQ
News
Locate Reseller
Other Products
FeedBack
Search Site

Failure Detection and Recovery

Graceful Termination

The Georgia SoftWorks Windows Telnet Server is outstanding in the case of a link or remote PC failure we attempt to gracefully terminate the executing DOS application, therefore saving important data that may otherwise be lost. Many applications are terminated by sending a sequence of characters to the application such as ESC-ENTER. Applications may have specific sequences. We allow a termination string to be defined as an environment variable in the k_start.bat or c_start.bat file. When a session is to be terminated due the client heartbeat timer expiring or the server side inactivity timer expiring then the defined termination string will be sent to the associated application. Approximately 3 seconds later the session is terminated if still running.

The termination string is a comma delimited list of keystrokes that you want to send to the shell ( or your application) before it is terminated due to either the Client Heartbeat timeout or the Server Side Inactivity timeout. No extra white space is allowed. The string is not case sensitive. For example you must specify 'shift-c' to produce a capital 'C'.

The following control key designators are defined.

·        shift-

·        alt-

·        ctrl-

The following special characters are defined.

·        ESC

·        ENTER

·        F1

·        F2 and so on through F12

Also a special operator is defined.

·        Sleepxx

This special operator will pause the output to the shell for xx seconds. This gives the application time to process the input. This is very useful when saving files to disk and for applications that flush the keyboard buffer. By default a 1-second pause is injected between keystrokes, however some specific cases may require the use of the Sleepxx operator to introduce additional delay.


To ensure graceful termination you may want to enter the string "e,x,i,t,ENTER" to exit the shell. Once the specified application is terminated by the user-specified string, the above string will complete the graceful termination process. This string sends the command exit and then enter[6] which are the commands to terminate a session. You must be sure that the user defined termination string does indeed terminate the application before sending the "e,x,i,t,ENTER" string otherwise unintended characters will be sent to the application.

Example -Graceful termination:  Amortization program - link failure.

We will continue to use the amortization program from the previous example. However, we will assume that a standard menu exists for the application. A File menu item exists that is invoked by alt-f. The list of items in the File menu list includes s for saving the work and alt-f for opening the file menu list again and then x for exiting the application. Next follows the ",e,x,i,t,ENTER" to gracefully close the shell.

Step 1. Create batch file c_start.bat

Step 2. Add this line to c_start.bat

d:\amor\amortize.exe

Step 3. Add this line to c_start.bat (note: there are no spaces in following the "=")

            SET LRA_TERMINATION=alt-f,s,sleep5,alt-f,x,e,x,i,t,ENTER

Step 4. Save file and exit.

Now when the User ID "bill" connects to the Windows NT/2000 system via telnet the application amortize.exe will automatically be executed. If the session is terminated due to system timeouts the termination string alt-f,s,sleep5,alt-f,x will cause the following sequence of events to occur.

First Alt-f to be sent to the application (This opens the file menu).

Second s is send to the application (for saving the file).

Third, the Sleep5 causes 5-second pause to allow the application time to save the files,

Fourth alt-f to open the file menu list again,

Fifth an x  is sent to the application to exit.

Finally ",e,x,i,t,ENTER" is send to the shell which terminates the session.

Other examples of termination string definitions are[7]:

 

SET LRA_TERMINATION=alt-f,x,e,x,i,t,ENTER

SET LRA_TERMINATION=F2,alf-f,x,e,x,i,t,ENTER

SET LRA_TERMINATION=ESC,ENTER,e,x,i,t,ENTER

 

Send mail to webmaster@georgiasoftworks.com with questions or comments about this web site.
Copyright © 1997 - 2008 Georgia SoftWorks. All rights reserved.
Last modified: June 24, 2008