Re: trying to get the process id for a spawned process to wait for it

2011-05-18 Thread C . Woody Butler
Ryan Johnson ece.cmu.edu> writes: > > What shell are you using? In bash, at least, the above won't work -- you > want Jobs=((Jobs+1)) > > Just to be sure, you've confirmed that the problem arises because the > if-then body runs with an empty $PID? Do the two echo commands fire? > > Ryan > >

Re: trying to get the process id for a spawned process to wait for it

2011-05-18 Thread Ryan Johnson
On 2:59 PM, C. Woody Butler wrote: 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 What shell are you using

trying to get the process id for a spawned process to wait for it

2011-05-17 Thread C . Woody Butler
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 <> & PID=$! echo $PID is