a bit simpler
correctly quote app cmd args
Merge pull request #4 from kr/master

simplify waiting on grandchildren