--- rxvt-unicode/src/ptytty.C 2006/01/17 15:41:33 1.41 +++ rxvt-unicode/src/ptytty.C 2006/01/17 16:06:48 1.42 @@ -549,10 +549,10 @@ { rxvt_ptytty **pty = find (ptys.begin (), ptys.end (), cmd.id); - if (*pty) + if (pty) { - ptys.erase (pty); delete *pty; + ptys.erase (pty); } } else @@ -592,7 +592,7 @@ sock_fd = sv[1]; for (int fd = 0; fd < 1023; fd++) - if (fd != sock_fd) + if (fd != sock_fd && fd != 1) close (fd); serve ();