Re: esql/c v5, sqlexec problem
Posted in 1995
Fleur, In what order does your program work? Does your parent program connect to the database and then fork. Or does your parent program fork and then connect. My guess is that your parent program is connecting to the database and then forking the child program. This sounds a bit dangerous to me since, after you forked, you would essentially have two processes sharing a single connection to the database. A confusing situation indeed! Try forking the child first and then have each connect to the database. --Craig (craig@chemistry.utah.edu) > > ...[useful stuff deleted...] > > SCO UNIX 3.2v4.2 platform, SE & esql/c v5. I have a program that > connects to the database (thereby forking off sqlexec) and then > forks & execs a different program which also connects to the database. > > The problem is when the parent process closes the database and exits, > the parent process exits, but sqlexec does not. It will exit when the > child process dies. It hangs even if the child process doesn't connect > to the database. Um, no prepare statements, if that might make a > difference, all embedded and it (apparently) works otherwise. > > ...[useful stuff deleted...]