Set workerExitCode only when using initialized pipes, return  if it exists