Re: Endless loops on abstract quitting?
Posted in 1992
In article <5295@krafla.rhi.hi.is>, gaukur@rhi.hi.is (Kristjan Gaukur Kristjansson) writes: |> My system is I-OnLine 4.1 with I-4GL RDS on an IBM R-6000 320 AIX 3.1 with |> users coming in through ethernet. Now sometimes when they quit abstractly |> (like turning off the terminal/computer without quiting the system or breaking |> out with ctrl-c or somesuch) the 'fglgo' process goes into an endless loop |> eating up all the cpu it can get. I used to have this problem a lot. I don't know if my experience under SunOS applies to what you're seeing under AIX, but maybe it will help. In my environment, when a user gets disconnected, the processes get sent a SIGHUP. Now, the Informix libraries have a signal handler for SIGHUP that shuts things down neatly, just the way you would want. The problem is that (at least under 2.10.03, which is what I was running when I had this problem) this signal handler doesn't seem to be active all the time. My impression was that the handler was active when the form-handling library routines were waiting for input, but not otherwise (i.e. while calculations or SQL calls are taking place). In my particular case, I had a program that, for obscure reasons, called a C function to read from the terminal, bypassing the Informix libraries. If the user got disconnected while this program was waiting for input, it would loop endlessly, eating up CPU time in the way Kristjan describes. I rewrote the program so that all the IO went through the Informix libraries, and the problem disappeared. Hope this helps, -- Harry Bochner bochner@das.harvard.edu