Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does wait command fail sometimes?

Status
Not open for further replies.

itpmguy

Programmer
Apr 25, 2002
31
US
I issued a wait command in a parent UNIX script and this waits for 15 - 20 background child processes. The child processes login to Oracle database and load data through SQL LOADER. This was working before on Linux and then it was moved to Solaris. It worked fine. But yesterday I noticed that the 'wait' command was NOT waiting for the child processes to complete. IF any of you know possible reasons for failure,please let me know. There are no error messages... The 'wait' command completes with exit code zero.
Thanks

Lokesh
 
This is what the man page is saying:

Otherwise, wait exits with one of the following values:
0
wait was invoked with no operands and all process IDs known by
the invoking shell have terminated.

If pid is not an active process id, wait returns immediately.



What kind of error checking do you have running for this?
 
I just check for the exit code of 'wait'. The background processes invoke SQL Loaderto load data into Oracle database in a loop. There are error checks for file errors, database errors etc. All these errors are logged into the database and for critical errors, an email message is sent to us. Any other recommendations for error ckecks???

 
how are you starting the sqlldr processes? Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top