RE: 4GL question
Posted in 2000
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues, Versions, Editions & End-of-Life
I am not sure if you are asking for a way to specify your own return code in the case of a SIGSEG or whatever, or if you are asking how to determine if you died due to an uncaught signal. on AIX I have found the following to be true, but do not have any documentation to assure me it is always true. 1. Normal return $? < 128 2. If the process exited abnormally (by receipt of a signal that it didnt catch) it returns the signal number +128 Example: if I do a kill -9 on a program $? is 137 So if the number is greater than 128 you died due to signal ($?-128) If you find out anything to the contrary please tell me Will >===== Original Message From "Carlson@WHSmith" <carlson1@bellsouth.net> ===== >For all the 4GL gurus out there: > >HPUX 10.20 >IDS 7.30.uc7 >4GL 7.20.ud6 > >I'm looking to return error codes from a 4GL program to the shell. >While I can trap and return an error code using "exit program", is there >a way to trap an error code if the program was killed, crashed, etc.??? > >Thanks in advance!! >-- >John Carlson >Informix DBA >WHSmith USA > >#include std_disclaimer.h /* These are my opinions, not my company's >opinion */ ------------------------------------------------------------ This e-mail has been sent to you courtesy of OperaMail, as a free service from Opera Software, makers of the award-winning Web Browser, Opera. Visit us at http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail account is waiting at: http://www.operamail.com/ ------------------------------------------------------------
William Rice wrote: > > I am not sure if you are asking for a way to specify your own return > code in the case of a SIGSEG or whatever, or if you are asking > how to determine if you died due to an uncaught signal. > Well, since you volunteered. . . . . I've been able to determine that on an HPUX system, a regular kill (15) will produce a $? of 1. Kill -9 will return 137. Kill -14 returns zero. I guess it all depends on what the cause of death was. I also know that I an able to control the return code from the program by using 'exit program nnn'. That would help for various SQL errors and such. But your first statement caught my curiosity. How can you specify you own return code in the case of an abnormal termination (kill, system issue, etc)? -- John Carlson Informix DBA WHSmith USA #include std_disclaimer.h /* These are my opinions, not my company's opinion */
Related threads
- Column name length in Informix
- Caching Data to Buffers
- Checkpoint Duration
- dbaccess standalone.
- Getting executable name.