This is the mail archive of the
mailing list for the Cygwin project.
trying to get the process id for a spawned process to wait for it
- From: C. Woody Butler <charles dot butlerjr at constellation dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 17 May 2011 18:45:23 +0000 (UTC)
- Subject: trying to get the process id for a spawned process to wait for it
Hi - I'm trying to launch a set number of threads,
wait for them to finish, launch another set of
threads, wait and repeat until there's no more input.
so - I've got this (this is in the middle
of a loop reading a file):
Jobs=$Jobs + 1
/tibcoresources/appmanage.exe <<lots of params>> &
echo $PID is the process
if [[ $Jobs -gt 2 ]]
But - I don't get anything back from $!
so the wait doesn't wait and I end up
launching a bunch of processes and taking
down the server, etc, etc, etc.
What am I doing wrong here?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple