--- rxvt-unicode/src/main.C 2006/01/16 15:00:20 1.180 +++ rxvt-unicode/src/main.C 2006/01/17 12:22:59 1.184 @@ -215,7 +215,7 @@ privileged_utmp (RESTORE); #endif - pty.put (); + delete pty; pty = 0; } rxvt_term::~rxvt_term () @@ -511,6 +511,8 @@ } #endif + pty = rxvt_new_ptytty (); + create_windows (argc, argv); dDisp; @@ -545,8 +547,8 @@ free (cmd_argv); - if (pty.pty >= 0) - pty_ev.start (pty.pty, EVENT_READ); + if (pty->pty >= 0) + pty_ev.start (pty->pty, EVENT_READ); check_ev.start (); @@ -719,16 +721,15 @@ void rxvt_term::privileged_utmp (rxvt_privaction action) { - if (OPTION (Opt_utmpInhibit) - || !pty.name || !*pty.name) + if (OPTION (Opt_utmpInhibit)) return; rxvt_privileges (RESTORE); if (action == SAVE) - makeutent (pty.name, rs[Rs_display_name]); + pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); else - cleanutent (); + pty->logout (); rxvt_privileges (IGNORE); } @@ -876,7 +877,7 @@ void rxvt_term::tt_winch () { - if (pty.pty < 0) + if (pty->pty < 0) return; struct winsize ws; @@ -885,7 +886,7 @@ ws.ws_row = nrow; ws.ws_xpixel = width; ws.ws_ypixel = height; - (void)ioctl (pty.pty, TIOCSWINSZ, &ws); + (void)ioctl (pty->pty, TIOCSWINSZ, &ws); #if 0 // TIOCSWINSZ⎈ is supposed to do this automatically and correctly