Re: 2 backends again.
Posted in 1992
Poul Pedersen writes: > is it possible to get 2 backends if an exec is not executed > correct ? > > 1 > frontend_1.4ge ------------- sqlturbo_1 > . > exec frontend_2.4ge > > > > 2 frontend_2.4ge +------------ sqlturbo_1 (NotWanted) > ! > +------------ sqlturbo_2 (Wanted) > Yes. When you fork a process, it will inherit all the attributes of the original process, including all the open file pointers/descriptors. Exec'ing a new process over this (or execing a new process over your original one) will not necessarily cause all the original files to be closed. Without closing those files, the sqlturbo will not terminate, thus you wind up with two sqlturbos. The solution: Before exec'ing the new 4ge, make a call to the sqlexit() function. This will cause your current sqlturbo to terminate. You can then exec your new 4ge with no extra sqlturbo resulting. Dave -- Disclaimer: These opinions are not those of Informix Software, Inc. ************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney