All the commands run in the parent process.
But, I need to set some environment variable in order one of the commands to work. To do that, i use system() call, but it spawns a child process, so the variable it sets, is not vsisble for the parent (which carries all the work). Setting the variable is all the child process does.
What i'm trying to do is to set the variable that will allow connection to oracle db. then I wnat to connect to the db and query it. The connection and querying are done in the parent process. I don't quite understand what youre saying there.