Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!maxim!prc From: prc@erbe.se (Robert Claeson) Newsgroups: comp.databases Subject: Re: Hang-up signals in Informix 4gl Message-ID: <1219@hulda.erbe.se> Date: 12 Apr 90 10:40:50 GMT References: <2536@husc6.harvard.edu> Organization: ERBE DATA AB, Jarfalla, Sweden Lines: 27 In article <2536@husc6.harvard.edu>, bochner@speed.harvard.EDU (Harry Bochner) writes: > Our users use rlogin from (Encore) annex boxes. From time to time a user is > forceably logged out, for instance because of a failure in the annex > box. The host machine gets a hangup signal, which properly kills the > login shell, but it doesn't kill the user's 4gl processes: instead of > dying, fglgo falls into a tight loop (probably trying to report the error?), > and eats up all the CPU time it can grab. I've seen this happen with Oracle as well. What I think happens is that those guys have thought of the case when someone dials into a systems and then hangs up without exiting the application first. That makes the read() system call return 0 (or was it -1?). However, when essentially the same thing happens with a network connection, be it rlogin or telnet, read() returns -1 (or was it 0?) and sets errno to some value. When Informix or Oracle (and I believe a fair number of other packages) sees the -1 being returned, they thinks "heck, something went wrong, let's try it again, and again, and again...". Mind you, many applications run with signals such as SIGHUP and SIGINT disabled by default, and relies on the return value from read() and write() instead. -- Robert Claeson E-mail: rclaeson@erbe.se ERBE DATA AB