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

Home -> Community -> Usenet -> c.d.o.tools -> Re: file descriptor leak in pro C

Re: file descriptor leak in pro C

From: Pierre Charpenay <pcharpenay_at_unilog.fr>
Date: Tue, 24 Apr 2001 13:42:14 +0200
Message-ID: <3AE56696.94A0B89D@unilog.fr>

gary adams a écrit :
>
> (excuse the repost, my email addr was wrong)
>
> I have a C program that connects to oracle via the statement
>
> EXEC SQL whenever sqlerror do sql_connect_error("init");
>
> EXEC SQL CONNECT :cinfo;
>
> if there is some sort of connect error, the sql_connect routine sets a flag
> that is process after the CONNECT.
>
> After a failed connect, i run the statement
>
> EXEC SQL ROLLBACK RELEASE
>

If the connect failed, you're not connected, so you don't have to disconnect ...
But as you're not connected, this instruction failed too, and then you probably execute your on-error function twice.

> I though the above would release any resources i have associates with
> oracle. However. if ithe listser is up, but the database is down the
> connect is not succesful, but the file descriptor remains open in my
> process.
>
> Is there anyway of clsong that file descriptor?
>
> thanks for any help
> GA
 

-- 
 Pierre CHARPENAY

    _______
   (\_vvv_/)
  / \ _ ^ / \
  | | o O | |
  |  \   /  |\
   \==\v/==/ \\
    ||-U-||  //
    ++   ++  V
Received on Tue Apr 24 2001 - 06:42:14 CDT

Original text of this message

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