This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with gcc or oracle??


I have an ESQL program which I am pre-processing with the oracle 8.1.6.0
pro*c tools then compiling with gcc version 2.95.3 20010315 (release)
sparc-sun-solaris2.7    (this also happens with solaris2.8 same compiler
version)    from www.sunfreeware.com

If I open a pipe , connect to the oracle database , close the pipe the
pclose call blocks.
If I open the pipe after connecting to the database then the pipe closes.
This does not happen with Sun Workshop, just gcc.

Oracle told me  "when the popen() is executed When the Oracle process was
inheriting the open file descriptor from the popen() call, the pclose() was
not causing the exec'ed process to exit."

Although I can work around it I am interested to know if this is caused by
gcc or oracle. Below is an example if there is someone out there using
pro*c/oracle with gcc. I can provide additional output if anyone is
interested in this.


		/* This Works */
        FILE *mypipe = popen("cat","w");
        if (!mypipe)bail("pipe not openable :(\n");
        fprintf (mypipe,"Hello world\n");
        pclose(mypipe);
        fprintf (stderr,"My pipe is closed\n");


		/* This fails */
	  EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;        /* set these as
appropriate*/
	  mypipe = popen("cat","w");
        if (!mypipe)bail("pipe not openable :(\n");
        fprintf (mypipe,"Hello world\n");
	  pclose(mypipe);
/* blocks here */
	  fprintf (stderr,"Don't see this unless I ^C");


__________________________
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. The contents are confidential and may be privileged.
Any views or opinions expressed are those of the sender and may not reflect the views or opinions of the company and the company accepts no liability in respect thereof.
If you have received this email in error please notify postmaster@abibuildingdata.com immediately.

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]