execv function fails when used as an Oracle external stored procedure 
Author Message
 execv function fails when used as an Oracle external stored procedure

I have written a c program that forks and execv's another
C++ program.  The reason for this is because Oracle external
stored procedure functionality does not support C++ shared
object files.  Here is my dilemma: when I create the
executable and run the a.out the program forks, and executes
the C++ program just fine.  However, when I compile the
program and use the .o file to create a .so file and then
trigger the program by executing the stored procedure from
Oracle... the .so file runs well and produces output, but
the program appears to skip over the execv function (as the
C++ program never does get executed).  Why is this so!?  Any
help would be greatly appreciated; I've been working on this
for weeks.

Thank you.

* Sent from AltaVista http://www.*-*-*.com/ Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful



Fri, 31 May 2002 03:00:00 GMT  
 execv function fails when used as an Oracle external stored procedure

| I have written a c program that forks and execv's another
| C++ program.  The reason for this is because Oracle external
| stored procedure functionality does not support C++ shared
| object files.  Here is my dilemma: when I create the
| executable and run the a.out the program forks, and executes
| the C++ program just fine.  However, when I compile the
| program and use the .o file to create a .so file and then
| trigger the program by executing the stored procedure from
| Oracle... the .so file runs well and produces output, but
| the program appears to skip over the execv function (as the
| C++ program never does get executed).  Why is this so!?  Any
| help would be greatly appreciated; I've been working on this
| for weeks.

The issue causing your problem is something in either the operating system,
or the associated libraries.  You probably should proceed by posing the
problem on comp.unix.programmer, and include more detail such as the OS
you are using.  It may be the case that due to threads being present from
the Oracle execution environment, that execv is suppressed (it would be a
disaster to run execv with threads).  Likely the proper steps would be to
make the code disable all threading before or after the fork, or us the
threading functions to manage this.

I don't know enough about either Oracle or threads to give any detail to
the advice, and it wouldn't be appropriate on comp.lang.c anyway, since
this newsgroup is specifically for issues of the standard C language.
Try comp.unix.programmer, but be prepared to move on from there in the
event it really is an Oracle or threading issue (though they may be able
to help some with threads).

BTW, I'm assuming Unix based on your reference to execv.  If this is not
the case, follow to the programming group for your environment.

--
| Phil Howard - KA9WGN | for headlines that | Just say no to absurd patents |

| Dallas - Texas - USA | linuxhomepage.com  | Shop http://bn.com/ instead   |



Fri, 31 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help with VC++ to Oracle using Stored Procedures

2. ADO stored procedures from VC++ using ORACLE

3. Calling Oracle stored procedures using MFC's classes

4. how to pass array to oracle stored procedure?

5. Oracle/C++ stored procedure call

6. ATL - >Oracle - >Stored Procedure

7. ATL - >Oracle - >Stored Procedure

8. Use the stored procedure of Oracle?

9. Resultset via stored procedure in ORACLE

10. ODBC + Oracle + MFC + Stored Procedure

11. Problems passing parameters to ORACLE stored procedure with ATL/OLEDB

12. how to retrieve a recordset from oracle stored procedure

 

 
Powered by phpBB® Forum Software