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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RE: wait/notify syntax for unix help please

RE: RE: wait/notify syntax for unix help please

From: Dunscombe, Chris <Chris.W.Dunscombe_at_accenture.com>
Date: Tue, 28 Oct 2003 00:34:24 -0800
Message-ID: <F001.005D4B66.20031028003424@fatcity.com>


There's no problem with waiting after the process has already finished, you'll just get a non-zero return code the wait but evrything will still work fine.

Chris

-----Original Message-----
Sent: 27 October 2003 18:54
To: Multiple recipients of list ORACLE-L

if you attemp to wait after the process is complete, will it cause a problem? say the PID no longer exists when you issue wait?
>
> From: "Dunscombe, Chris" <Chris.W.Dunscombe_at_accenture.com>
> Date: 2003/10/27 Mon AM 11:39:34 EST
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Subject: RE: wait/notify syntax for unix help please
>
> I don't know about Solaris but on HP-UX and AIX you can do:
>
> run_sql_1 &
> run_sql_2 &
> wait
>
> This will wait until both have finished.
>
> Re a specific PID $! will return you PID of the last child process and
then
> you can wait on that PID. Looks something like:
>
> run_sql_1 &
> run_sql_2 &
> PID_WAIT=$!
> wait ${PID_WAIT}
>
> HTH
>
> Chris Dunscombe
>
>
> -----Original Message-----
> Sent: 27 October 2003 16:09
> To: Multiple recipients of list ORACLE-L
>
>
> I need to parallelize some sql operations and Im running them from unix
> scripts.
>
> I want to spawn off a few in the background from a master script, then
have
> the master script 'wait' for them to finish. Ive done this in Java and
with
> dbms_alert, but I cant dig up the syntax to do this with korn shell on
> solaris.
>
> Also, if I want to wait for a specific PID, how do I get the PID of the
> thread I want to wait for?
>
> so I have
>
> nohup run_sql &
>
> wait(on previous nohup)
>
> then to use notify, I just use 'notify()' inside the script right?
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: <ryan_oracle_at_cox.net
> INET: ryan_oracle_at_cox.net
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Dunscombe, Chris
> INET: Chris.W.Dunscombe_at_accenture.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: <ryan_oracle_at_cox.net
  INET: ryan_oracle_at_cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Dunscombe, Chris
  INET: Chris.W.Dunscombe_at_accenture.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 28 2003 - 02:34:24 CST

Original text of this message

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