Fixed issue provoked by SIGHUP received by the new forked pty