4gl timer
Posted in 1997
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I need the capability in a number of 4gl applications to have a timer feature built in, so that if the program senses no activity for a given length of time it will automatically refresh the screen with current data from the database. This might be within a "menu", "prompt" or "display array " statement for example. I have one working method in a menu statement. It calls a C function to spawn a child process. The child then sleeps for the given length of time and sends a SIGQUIT back to the parent, which can be easily trapped in 4gl interactive statements. This works fine, but is not desirable as it continually spawns numerous short lived child processes. If anyone is aware of a cleaner way or maybe an undocumented feature in 4gl to do this I'd appreciate it. Interestingly, I tried having a C function simply call alarm(), but I was not able to write a signal handler for the SIGALRM signal that worked. 4gl seems to block any attempts to rewrite the handler for this signal. Any ideas would be greatly appreciated ... Thanks in advance. -- Rod Fredette rfredet@medicode.com