ORA-28576: lost RPC connection to external procedure agent error [message #66997] |
Fri, 16 May 2003 08:31 |
David
Messages: 110 Registered: November 1998
|
Senior Member |
|
|
hi everybody,
i have a disgusting problem with executing external c procedures. These procedures are very simple, but some of them raise an oracle ORA-28576: lost RPC connection to external procedure agent error. Here i attached sample code:
PL/SQL code:
CREATE OR REPLACE PACKAGE BUIS.C_TEMP as
procedure testprc
as language c name "testprc" library buis.oraexec;
procedure execute_prog(program in ptype.tstring)
as language c name "runprog0" library buis.oraexec;
procedure execute_prog(program in ptype.tstring, par1 in ptype.tstring);
end;
C code:
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
.....
#include <time.h>
#define LOGFILE "/tmp/oraexec/oraexec.log"
void testprc (void)
{
FILE *log = fopen("/tmp/oraexec/test", "a");
fprintf(log, "testprc call");
fclose(log);
}
void runprog0(char* program)
{
execl(program, program, (char*) 0);
}
the first function testprc runs clearly but the second one runprog0
raises aforesaid error message. but here is very cool thang!! runprog0 function (that raised the exception) perform the execl(program,....) correctly. if i write for example
void runprog0(char* program)
{
execl(program, program, (char*) 0);
chdir("/tmp/");
}
so it performs succesfully execl statment, then raises exception and then do not performs chdir statement.
if i write for example
void runprog0(char* program)
{
chdir("/tmp/");
execl(program, program, (char*) 0);
}
so it performs succesfully chdir statment, then raises exception and then do not performs execl statement.
i am despaired of this problem and don't know where could be the problem. please help me
so much thanks for any advice
david
|
|
|