4GL Program Running In Background
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
We have a series of 4GL programs that are designed to be able to be run in either foreground or background. When running in foreground, if a database error is encountered, the program opens a window with a message to this effect and reports the error to the program's log. However, if this same program is being run in background (i.e. no terminal is attached) the attempt to display the window (naturally) fails but the program execution fails to terminate. The process then consumes process and engine time until other user's complain about system response and we notice the error in the log file then kill of the executable. Is there any way of a 4GL program detecting that it is being run in background (regardless of whether the parent process is still attached or not). If we were able to detect this we could have the program call an error routine that does not attempt to write back to the terminal. Regards Glyn Balmer BICC Cables Limited Erith Kent UK Migrating from :- Informix-OnLine 5.01.UD4 / I4GL 4.10.UE3 UNIX SVR4 To :- Informix Dynamic Server 7.30.UC2 / I4GL 7.20.UD7 SCO Openserver 5.0.4 -- "Nothing succeeds like a toothless budgerigar" --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---
<glynb@bicceri.demon.co.uk> wrote in message news:7hbrar$tui$1@nnrp1.deja.com... > Is there any way of a 4GL program detecting that > it is being run in background (regardless of whether the parent process is > still attached or not). If we were able to detect this we could have the > program call an error routine that does not attempt to write back to the > terminal. > We simply pass a flag to the program such as -bkgrnd then control error trapping accordingly. Shawn