deal with abrupt termination of the child go process by handling EOF