[omniORB] Forks, BOA, ports and persistence

Gary D. Duzan gdd0@gte.com
Fri, 11 Jun 1999 08:51:11 -0400


In Message <3760D598.4E67B8ED@adaptivebroadband.co.uk> ,
   Nick Brook <ncb@adaptivebroadband.com> wrote:

=>Michel Vayssade wrote:
=>> 
=>> On Thu, 10 Jun 1999, Nick Brook wrote:
=>> > associated with that object. In fact I can kill ALL the parents /
=>> > grandparents / etc. leaving only the children and STILL all these ports
=>> > are LISTENing. But there's no process around that could be doing the
=>> > LISTENing, unless the child process is somehow listening all every port
=>> > that has ever been used by a BOA. Weird.
=>> 
=>> when a process is LISTENing, there is a descriptor open on the socket
=>> when the process forks, the child heritates all descriptors
=>> the child must close the descriptor associated with the initial
=>> parent's socket
=>> isn't ?
=>> 
=>
=>Thanks Michel, 
=>
=>Any idea how I close down the descriptor in the child? I've tried
=>shutdown on the boa but that doesn't work.

   I had a similar problem a while back with a non-CORBA related daemon
process. It is usually a good idea to call close() on file descriptors
above 2 after fork() and before exec*(). What the max file descriptor
is will depend on your system, and I think it is typical to just pick
some fairly large number (64, 256) as the max and ignore any errors
from close().

					Gary Duzan
					GTE Laboratories