I have a program like this (that's for Pro*C precompiler):
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <errno.h>
EXEC SQL BEGIN DECLARE SECTION;
static VARCHAR ora_connect_str[81];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA;
int main()
{
FILE *f;
int rc = 1;
char *eptr=getenv("DB_LOGIN");
strcpy(ora_connect_str.arr, eptr);
ora_connect_str.len = strlen(eptr);
EXEC SQL CONNECT :ora_connect_str;
f=popen("exit 0", "r");
rc = pclose(f);
printf("errno=%d rc=%d\n", errno, rc);
}
When I use a tcp/ip connection to oracle, it works ok. But when I use BEQ, pclose() returns -1 with errno 10. Can someone direct me to a document(s) describing the possible issues with BEQ connections? It appears that somewhere in the oracle's entrails there is wait() call already…