sqlturbo connection gets inherited
Posted in 1994
I just learned something interesting about sqlturbo connections. Perhaps this is common knowledge somewhere, but it's new to me: When a process (an ESQL/C process, for example) begins talking to Informix, it spawns an sqlturbo process and opens a pipe to it. 2 file descriptors are used; one for reading and one for writing. Nothing exciting so far. Now, when the original process creates son processes for other reasons, they too inherit the open pipes. This can lead to orphaned sqlturbo processes if the parent exits/dies but the child remains. The orphaned sqlturbo, in this case, will go away when the child process goes away. To me, it seems dangerous that son processes begin life accidentally connected to an sqlturbo. This could lead to additional problems if the son tried to read/write these files. Has anybody else noticed this? Is there any simple solution? It would seem that Informix could set the "close on exec" flag for the pipe fd's, so that the open files would not be inherited. Perhaps there is some reason one would want them inherited, but I can't think of one. I'm running Informix 5.01, on an IBM RS/6000, but I would guess that this behavior is common to many or all platforms. -- ------------------------------------------------------------------------------- Todd Saylor | Bi-Tech Software, Inc. "No matter where you go, there you are" | (916) 891-5281 ----------- Opinions expressed are subject to change without notice -----------