[omniORB] spawn a server from a server part 2

Rusty Carruth c1040@azfms.com
Tue, 26 Jan 1999 07:33:17 -0700


> 
> Are there any mechanisms in omniORB to block all threads for this
> very little time, so I've time to close the fds?
> 
> What is the general way to spawn a new omniORB server process from   
> another
> server process ??????

we use fork1, which only forks the current thread.  If your OS has
that, then the only thing you have to worry about is the deadlock you
can get into if you are printing in a thread which is not copied,
and then you try to print in the forked thread - you cannot print because
that other (non-existant) thread has the print resources locked, and
since it does not exist, it will never get back around to release them
(it?) for you.  So, if you do fork1 (under Solaris, anyway), don't follow
it with a printf unless you are certain that no other thread will ever
be printf'ing when the fork1 happens...

The above is for Solaris 2.5.1, anyway.  YMMV.

rusty