Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle child process steals my socket

Re: Oracle child process steals my socket

From: Vic Abell <abe_at_purdue.edu>
Date: 12 Oct 2002 03:48:18 -0700
Message-ID: <825ee26b.0210120248.4294504c@posting.google.com>


barnest_at_san.rr.com (Tom Barnes) wrote (in part) in message news:<ae6b6116.0210111654.4347cf7b_at_posting.google.com>...
> ...Sometimes when we kill the Java
> process (kill -9) the Oracle child process stays up and in some
> strange way "inherits" the socket

There's nothing strange about that. A UNIX child process inherits the file descriptors of its parent unless the parent closes them first or marks them as close-on-exec.  

> Shouldn't the child process automatically die when the parent is
> killed?

Not necessarily.

> Why is the child keeping the socket file descriptor open?

The parent process "willed" it to the child process when it exec'd the process.

If the child process has no use of the socket, then the parent must close it or mark it close-on-exec. Alternatively, a well formed child process should close all the descriptors it doesn't intend to use. It sounds to me like you have exposed an Oracle bug that would be easy to fix if it were in open source software.

Vic Abell, lsof author Received on Sat Oct 12 2002 - 05:48:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US