Show error code when a child exits

This is useful for debugging problems with children.
Merge pull request #58 from hjr3/patch-1

Show error code when a child exits