prevent race with quickly exiting processes

this is technically covered by the 100-times-in-a-row integration test,
but is much harder to reproduce (and detect)

Signed-off-by: Steve Powell <spowell@pivotal.io>