implement checking of child process exit status (as per spec)