tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Maria Waldemark <maria.waldemark () ifsab ! se>
To: tru64-unix-managers
Subject: Answer to <s6ef79be.060@DGEQ.QC.CA> ?
Date: Wed, 28 Jun 2000 07:21:02 +0000	[thread overview]
Message-ID: <96217652811557.tru64-unix-managers.marc@archive.invalid> (raw)

Hi,

I have the same problem with sleep as described below. I wonder where I can
see the answer. 

Regards
/Maria

Hi managers,

I use Oracle 7.3.4 ans DU 4.0d and I have a little problem with a proc*c
program I wrote.  I connect to an oracle database with a "/" (OPS$),
make some stuff, disconnect then sleep for a while, the sleep command
doesn't work and it happends only when I connect with "/", no problem with a
connection like "ropo1/pom@lpdev" intstead of "/".  The problem occured
when I disconnect from the database. 

Here what it's said in the sleep man page:

"If the sleep() function returns because the requested time has elapsed, it
returns 0 (zero)....", normal case.

"...If the sleep() function returns because it caught a
signal, the function returns the number of seconds remaining in the suspen-
sion."  What signal? I think that when I disconnect from the database, a
signal is sent and catched by the sleep command. I catched all signals in my
original program and see nothing.

Here is the program I used has a test. Maybe someone get an answer.
BTW, no problem with Oracle 7.3.2 and DU 3.2g.

TIA!

#include <stdio.h>
#include <sqlca.h>  
#include <unistd.h>

void main(int argc, char *argv[])
{

   EXEC SQL WHENEVER sqlerror    goto ErrOracle; 
   EXEC SQL WHENEVER sqlwarning  goto ErrOracle; 

   while(1)
   {
      EXEC SQL CONNECT :argv[1];   
      printf("Connect:%s\n",argv[1]);
               
      EXEC SQL COMMIT RELEASE;
      printf("Deconnect\n");
      printf("zzzz...\n");
      sleep(10);
   }

ErrOracle: 
    printf("Erreur:%d\n",sqlca.sqlcode);

}



,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,
Maria Waldemark
Maria.Waldemark@ifsab.se 	IFS Sverige AB
tel arb: 08 - 799 74 48		Korta gatan 7
fax: 08 - 799 27 01		S-171 54 SOLNA
mobil  : 070 - 6450941		http://www.ifsab.se

                 reply	other threads:[~2000-06-28  7:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox