Re: Exit codes
Posted in 1992
Quoting Stuart Hemming... > I've got an application written using RDS the has been working well > for some time. The program is called from within a shell wrapper. > Now, for some reason, if during an input the user uses the delete key > to abort an input the program, when finally exitted the shell wrapper > aborts. $? returns 208. All this happens even if the aborted input is > not the last action prior to leaving the program. Boy, I haven't seen this problem since August of '89. What is happening is when you hit DEL in your 4GL program, the shell wrapper is remembering it. When you exit the 4GL program the shell wrapper acts on the DEL that it remembered and exits. Here's what you need to do... in you shell wrapper, put the following line near the top. trap "echo \\"\\c\\"" 2 What this will do is tell the shell wrapper to echo nothing and stay on the same line when it goes to act on the DEL it remembered. True you could try the following: trap "" 2 But that will make the shell wrapper AND THE 4GL PROGRAM ignore the DEL completely. Definitely an no-no. DAS -- David A. Snyder @ Snide Inc. - Folcroft, PA Current Release is db4glgen-3.7 UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com