Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!mit-eddie!snorkelwacker.mit.edu!usc!cs.utexas.edu!uunet!comp.vuw.ac.nz!am.dsir.govt.nz!dsiramd!marcamd!mercury!fivegl!hugh From: hugh@fivegl.co.nz (Hugh Grierson) Newsgroups: comp.databases Subject: Re: INFORMIX bug? Keywords: informix bug 4gl Message-ID: <1990Nov26.121526.28416@fivegl.co.nz> Date: 26 Nov 90 12:15:26 GMT References: <8330@pbhyf.PacBell.COM> Reply-To: hugh@fivegl.co.nz (Hugh Grierson) Organization: 5GL International Ltd, Auckland, New Zealand Lines: 34 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. >... A guess - is it possible that 4GL is not closing the write-end of its pipe to sqlexec after fork()ing, and is not using the close-on-exec flag. Then no matter what you do in the parent 4GL program, sqlexec will not know that the pipe has closed, and possibly may not terminate. I can't test this theory, as the behaviour is correct on our machine, but you could try it by running a C program something like this from your 4GL program (with "without waiting"): /* untested */ /* apologies for incorrectness/unportability */ #include main() { int i; for (i=3; i<_NFILE; i++) close(i); sleep(100000); } Let me know... -- | Hugh Grierson | hugh@fivegl.co.nz | 5GL International Ltd | PH: +64.9.3021621 | Auckland, New Zealand | FAX: +64.9.3021617