[omniORB] How to spawn savely new Servers from a o
Ralf Walther
rw@neurotec.de
Mon, 25 Jan 99 16:01:00 GMT
Hi CORBAholics!
I have implemented an omniOrb server, which has a special method to spawn
a
new server process. At first it forks and then replaces via execl the
execution code of the new process. The father process has opened a pipe
to
communicate with the child process; the new server stringifies its IOR
and
returns it to the father process.
Unfortunatly we run into trouble, because open file descriptors of the
orb
have been copied, too.
In the archive, I've found an article about this topic, but it wasn't
able to answer my questions ...
(http://www.orl.co.uk:80/omniORB/archives/1998-04/0110.html)
HOW TO spawn savely a new CORBA server within a servers method ???
Why isn't it enough to act like this?
- fork server process
- child process calls setsid() to change the father process id to 1
(init)
- close fds (But which? All but 0,1,2 ?)
- execl
Thanks in advance
Ralf