[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
When does a background process complete?
From: |
V. Mark Lehky |
Subject: |
When does a background process complete? |
Date: |
Fri, 21 Sep 2001 09:14:57 -0400 |
I have written a recursive function (one that calls itself). In an attempt
to speed it up, I have made the call to itself in the background, using the
"&" symbol.
Here is my problem: I then have a script which calls this function the
first time. Subsequent commands in this script need to have everything
this function does completed. How can I detect, from my script, when all
the processes from this function have completed?
I can post the actual code, if it will help. Here is almost pseudo-code to
hopefully descripbe what I am looking for:
function my_function
{
if stop condition false
my_function &
else
return
}
# begin script
my_function
# now I need to find out if all the background tasks have completed
continue with script ...
TIA, Mark L.
- When does a background process complete?,
V. Mark Lehky <=