Re: Question about the sqlexec process and forks
Posted in 1992
Path: emory!swrinde!mips!spool.mu.edu!olivea!sgigate!psinntp!psinntp!gdc!bergquis From: bergquis@gdc.com (Brett Bergquist) Newsgroups: comp.unix.questions,comp.unix.programmer,comp.unix.misc,comp.unix.aix,comp.databases.informix Message-ID: <266@esun_server40.gdc.com> Date: 8 Mar 92 14:38:21 GMT References: <5302@mtecv2.mty.itesm.mx> Sender: news@gdc.com Nntp-Posting-Host: wimpy alfonso@mtecv2.mty.itesm.mx writes: <stuff deleted> : My problem? As you know, every process belongs to a process group. All the child processes belong to their parent process group. I'm not sure, but I believe that the sqlexec process that is created to asist a process with the database belongs to the same process group, so it is created only once, therefore the child processes and the parent process share the same sqlexec process, so when concurrent queries are run and there are multiple child processes running, the sqlexec process confuses and send : : : : sql results to the wrong processes, making them to issue a "Invalid message type receive from sqlexec process" message and aborting. : Am I right in my ideas? Or there's a way to fix my problem? : : Alfonso Trevino : : : You need to close your database in the parent process, fork the child, and then reopen you database in both parent and child. I also think you need to call sqlstop in the parent before the fork, and call sqlstart after the fork to terminate and reinitialize the sqlexec process so the child does not share it. In a later version (4. something), there is an sqldetach function. -- Brett M. Bergquist, Principal Engineer | "Remind me" ... "to write an General DataComm, Inc., | "article on the compulsive reading Middlebury, CT 06762 | of news." - Stranger in a Strange Land Email: bergquis@gdc.com