Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: file descriptor leak in pro C
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-|| // ++ ++ VReceived on Tue Apr 24 2001 - 06:42:14 CDT