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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with Oracle DB pipes

Re: Problem with Oracle DB pipes

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 28 Apr 1999 13:30:57 GMT
Message-ID: <37280d3a.95823797@192.86.155.100>


A copy of this was sent to bbrelin_at_my-dejanews.com (if that email address didn't require changing) On Tue, 27 Apr 1999 22:05:57 GMT, you wrote:

>Hello,
>
>I'm a newcomer to Oracle but I've been doing system programming on Unix
>for a while. I've run into a problem which I can't seem to resolve.
>
>I have a daemon which reads a database pipe that is written to by a
>stored procedure on an Oracle Database. The data sent contains, among other
>things, the name of another DB pipe (pipe 2) that was written to by another
>program.
>
>This daemon then forks off a job to go and read pipe2. The problem is that if
>the daemon forks off a child and this child tries to read pipe2, the call
>fails. if the daemon goes ahead and reads pipe2 without forking off a child
>to read pipe2, the read succeeds. I don't get it. I'm having a hard time
>debugging the read pipe call because the return value from the embedded SQL
>command (which is turned into C with the Oracle Pro/C precompiler) only
>returns success or failure, not *why* it failed.

You must LOGOFF in the parent before forking a child. The parent and child cannot share a connection at all. The parent needs its own connect, the child its own.

When you fork the child, it inherits the open file descriptors, signals and all. the parent and child will 'fight' over the data on the socket we are using to talk to the database. It won't work.

>
>Anybody have any idea why this isn't working? I'm running Oracle 8.0.5 on
>a Sun E10000 with Solaris 2.6.
>
>Any help appreciated.
>
>Thanks,
>
>Braun Brelin
>bbrelin_at_my-dejanews.com
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Apr 28 1999 - 08:30:57 CDT

Original text of this message

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