Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!hplabs!pyramid!infmx!markj From: markj@informix.com (Mark Jeske(Chicago Consultan)t) Newsgroups: comp.databases Subject: Re: INFORMIX bug? Keywords: informix bug 4gl Message-ID: <1990Nov20.221658.19496@informix.com> Date: 20 Nov 90 22:16:58 GMT References: <8330@pbhyf.PacBell.COM> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 41 In article <8330@pbhyf.PacBell.COM> jwas@PacBell.COM (Joe Wasik) writes: >We have this rather annoying problem with Informix-4GL. When an Informix-4GL >application runs and accesses a database, it starts a back-end named sqlexec. >This back-end is supposed to die when the Informix-4GL application terminates, >but it doesn't. In our case, since the Informix-4GL application starts up >other background jobs, the sqlexec program hangs around until those other jobs >are finished and it then interferes with the logoff process. > >This is rather bizarre behavior. Those other jobs are simple Unix scripts an >have nothing to do with Informix' database. What on earth is sqlexec waiting >for? > >This question has been asked before on this net without resolution, so we've >implemented our own solution. Before the Informix-4GL program ends, it >executes something like the following (not actual code): > >system("nohup kill -16 `ps -u ${LOGNAME} | cut -1-6 | grep " sqlexec$"` &") >(Not shown: a check to ensure that there is only one sqlexec). > >In case anyone else had this problem, this solution does work. The user >when logging off now drops out of the system instead of hanging or getting >the "login:" prompt. > >We still have some questions though (from the general public) ... Is a signal >16 (found by trial and error) an appropriate way to kill sqlexec? Are we >doing any harm to our database by terminating sqlexec with kill? > I would try the following in your code before you exit. close database call sqlexit() I know sqlexit is not documented, but it should kill your sqlexec process. If that doesn't work, it would use a kill -13 sigpipe signal on the sqlexec. We trap for this signal and clean up gracefully, I'm not sure about the -16. Mark Jeske (Chicago consulting) markj@infmx.com 708-699-5850