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.