--- rxvt-unicode/src/ptytty.C 2006/01/17 15:41:33 1.41 +++ rxvt-unicode/src/ptytty.C 2006/01/17 16:50:42 1.43 @@ -392,7 +392,9 @@ rxvt_ptytty_unix::~rxvt_ptytty_unix () { +#if UTMP_SUPPORT logout (); +#endif put (); } @@ -539,20 +541,22 @@ } else if (cmd.type == command::login) { +#if UTMP_SUPPORT if (find (ptys.begin (), ptys.end (), cmd.id)) { cmd.hostname[sizeof (cmd.hostname) - 1] = 0; cmd.id->login (cmd.cmd_pid, cmd.login_shell, cmd.hostname); } +#endif } else if (cmd.type == command::destroy) { 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 +596,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 ();