Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!mcdchg!ddsw1!neptune!roberto From: roberto@neptune.UUCP (Robert Owings) Newsgroups: comp.databases Subject: Re: INFORMIX bug? Keywords: informix bug 4gl Message-ID: <186@neptune.UUCP> Date: 26 Nov 90 20:07:36 GMT References: <8330@pbhyf.PacBell.COM> <1990Nov20.221658.19496@informix.com> <8335@pbhyf.PacBell.COM> Reply-To: roberto@neptune.UUCP (Robert Owings) Organization: McDonalds Corp., Oak Brook, IL Lines: 48 In article <1990Nov20.221658.19496@informix.com> markj@informix.com (Mark Jeske(Chicago Consultan)t) writes: >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. Informix's code exec's the sqlexec process when the $datebase call is made using a simple pipe()/fork()/exec() combo... unfortunately informix doesn't set the close on exec flags. Check your namelist for these two symblols: spqin sqpout nm -x YOUREXECUTABLE | egrep '^sqpin|^sqpout' then add a function after your $database that does this #include extern short int _sqpin; /* Global informix symbol - MAGIC MAGIC */ extern short int _sqpout; /* Global informix symbol - MAGIC MAGIC */ set_to_exit() { /* * don't check errors, if it doesn't work we're no * worse off than before. */ (void)fcntl(_sqpin, FSETFD, 1); (void)fcntl(_sqpout, FSETFD, 1); } If the above symbols aren't in your namelist. Fire up the debugger of your choice, place a breakpoint at the beginning of pipe(), run till breakpoint, then check the stack trace for the address of pipe()'s argument. Grep thru the namelist for the address and modify the above code appropriately (praying all the while that informix didn't declare these static in your release). This function can occur at any point after the $database. Since you are using 4gl, you may not be able to place it close to the $database so you might want to put it near the exec() to your other processes. roberto *** My opinions are my own... use them at your own risk. ***