Re: Gracefull Exit
Posted in 1995
} } Chetan Anand (anand@sin-co.sin-ro.DHL.COM) wrote: } : > } : > I would also be interested in an application that will cause } : > user's to exit an application gracefully after being } : > inactive for a certain period of time. } : > } : > [ Stuff Deleted ... ] } } : This can also be accomplished by interfacing with a 'C' Function which } : in turn will set signal handler and will time out based on specified } : interval. Upon interval elapse, 'C' Function should able to call } : 4GL function to execute 'EXIT PROGRAM'. } } Does this technique use the alarm() system call? Wouldn't that interfere } with programs that do a SLEEP? I think it is possible to code nested } timers, if you are careful to save/restore the SIGALRM handler and the } alarm value. But I have no idea how well this method works in Informix. } } [ Stuff Deleted ... ] } Currently I have implemented this based on save / restore SIGALRM Handler, which so far no Problems even with nested timer settings. -- Rgds, ========================================================================== Chetan Anand DHL INTERNATIONAL (Singapore) Pte Ltd Systems Analyst Singapore INTERNET : anand@sin-co.sin-ro.dhl.com PHONE : 65+ 3805-804 ==========================================================================