Re: sqlexit funny behavior
Posted in 1997
We had a similar problem, which was caused by opening a pipe after having attached to a database. Normally sqlturbo is blocked on a read from the pipe it has established with the client app. sqlexit closes this pipe at the client end, sqlturbo gets an error and closes down. However, after our popen the fds have been duplicated in the forked process (including the database connection) and the sqlturbo sits waiting on this instead. No error is generated and so sqlexit hangs. The fix was to either to pclose before sqlexit, or re-do popen to close unnecessary fds. Hope that helps. Andy. > > We have several server-type applications when started, open a database, > read tables for initialization, close the database via E/SQL and then > remain idle for hours or days until called upon. This situation seemed > perfect for sqlexit to free the database resources used during > initialization. When the servers' initialization are finished, sqlexit is > called after the CLOSE DATABASE statement. > > The problem appears when the server wakes up, does its work, closes > the database and then calls sqlexit for the second time. From the > debugger, the server goes into an infinite loop inside sqlexit. The > stack track shows an infinite loop in the following routines: > > sqlexit > killbackend > wait > _wait_sys > $cerror > > The ESQL product is INFORMIX-ESQL Version 5.03.UC1 > The On-Line server is RSAM Version 5.03.UC1 > The hardware and OS are HP-UX 09.01 A 9000/755 and > HP-UX 10.20 A 9000/755. > > The sqlexit routine would be a very nice thing to have working > properly in these server applications. What I am doing wrong? > > Any help and/or advice would be appreciated on this. > > Thanks! > > mgo > > -------------------==== Posted via Deja News ====----------------------- > http://www.dejanews.com/ Search, Read, Post to Usenet > -- =-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-= Andy Lennard andy@kontron.demon.co.uk =-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=