Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sending data to pipe in signal handler ???

Re: Sending data to pipe in signal handler ???

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 29 Jul 1998 17:43:30 GMT
Message-ID: <6pnn02$7t8$1@relay1.dsccc.com>


EXEC SQL begin declare section ;

 static varchar		command [40] ;	/* command for daemon to execute		*/
 static int		pipe_delay ;	/* dbms_pipe seconds delay	 		*/
  static int		status ;	/* temp dbms_pipe return status storage		*/
EXEC SQL end declare section ;

        pipe_delay = 1800 ; /* 30 minute delay */

	    /**********************************************************************
	    *
	    *	We wait here for an ORACLE message in the dbms pipe or :pipe_delay,
	    *	which ever is first.
	    *
	    **********************************************************************/
	    command.len = 0 ;
	    EXEC SQL EXECUTE
	      BEGIN
		:status := dbms_pipe.receive_message ('srl_vax', :pipe_delay) ;
                if :status = 0 then
                  dbms_pipe.unpack_message (:command) ;
                end if ;
	      END ;
	    END-EXEC ;

	    command.arr [command.len] = '\0' ;	/* add C string terminator	*/


Wolfgang.Rothmayer_at_bmw.de wrote:
: Hi there,

: What is the correct way to terminate a UNIX process listening to an
: ORACLE pipe in a while loop ?

: We tried to install a signal handler which sends a special message to
: the while loop to terminate the process, but doing so causes the
: progam to hang up.

: Is it OK just to kill the process without any synchronization for the
: ORACLE pipe ?

: Any input is greatly appreciated.

: So long,
: Wolfgang.

--
While DSC may claim ownership of all my ideas (on or off the job), DSC does not claim any responsibility for them. Warranty expired when you opened this article and I will not be responsible for its contents or use. Received on Wed Jul 29 1998 - 12:43:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US