This is the mail archive of the
mailing list for the Cygwin project.
Re: trying to get the process id for a spawned process to wait for it
Ryan Johnson <ryanjohn <at> 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?
the $Jobs thing works fine (surprised me actually
but I went with it - I'm not a beginner programmer
but I'm fairly new to BASH scripting, and this was my
first attempt at doing math ).
yes, the echoes fire, and the $PID is blank.
that echo just says "is the process".
And I just ran it to make sure I wasn't crazy,
and apparently I was because now it's working
beautifully. And unless the CYGWIN gremlin changed
it it's still the same code I posted.
And it still adds right.
Sooo - thanks. I'm crazy, it works as advertised,
and all's right with the world.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple