examples: wait for clean exit
Merge pull request #205 from mreiferson/example_exits_205

examples: wait for clean exit