… | |
… | |
213 | |
213 | |
214 | #ifdef UTMP_SUPPORT |
214 | #ifdef UTMP_SUPPORT |
215 | privileged_utmp (RESTORE); |
215 | privileged_utmp (RESTORE); |
216 | #endif |
216 | #endif |
217 | |
217 | |
218 | pty.put (); |
218 | delete pty; pty = 0; |
219 | } |
219 | } |
220 | |
220 | |
221 | rxvt_term::~rxvt_term () |
221 | rxvt_term::~rxvt_term () |
222 | { |
222 | { |
223 | HOOK_INVOKE ((this, HOOK_DESTROY, DT_END)); |
223 | HOOK_INVOKE ((this, HOOK_DESTROY, DT_END)); |
… | |
… | |
509 | rxvt_perl.init (this); |
509 | rxvt_perl.init (this); |
510 | HOOK_INVOKE ((this, HOOK_INIT, DT_END)); |
510 | HOOK_INVOKE ((this, HOOK_INIT, DT_END)); |
511 | } |
511 | } |
512 | #endif |
512 | #endif |
513 | |
513 | |
|
|
514 | pty = rxvt_new_ptytty (); |
|
|
515 | |
514 | create_windows (argc, argv); |
516 | create_windows (argc, argv); |
515 | |
517 | |
516 | dDisp; |
518 | dDisp; |
517 | |
519 | |
518 | init_xlocale (); |
520 | init_xlocale (); |
… | |
… | |
543 | |
545 | |
544 | init_command (cmd_argv); |
546 | init_command (cmd_argv); |
545 | |
547 | |
546 | free (cmd_argv); |
548 | free (cmd_argv); |
547 | |
549 | |
548 | if (pty.pty >= 0) |
550 | if (pty->pty >= 0) |
549 | pty_ev.start (pty.pty, EVENT_READ); |
551 | pty_ev.start (pty->pty, EVENT_READ); |
550 | |
552 | |
551 | check_ev.start (); |
553 | check_ev.start (); |
552 | |
554 | |
553 | HOOK_INVOKE ((this, HOOK_START, DT_END)); |
555 | HOOK_INVOKE ((this, HOOK_START, DT_END)); |
554 | |
556 | |
… | |
… | |
723 | return; |
725 | return; |
724 | |
726 | |
725 | rxvt_privileges (RESTORE); |
727 | rxvt_privileges (RESTORE); |
726 | |
728 | |
727 | if (action == SAVE) |
729 | if (action == SAVE) |
728 | pty.login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); |
730 | pty->login (cmd_pid, OPTION (Opt_loginShell), rs[Rs_display_name]); |
729 | else |
731 | else |
730 | pty.logout (); |
732 | pty->logout (); |
731 | |
733 | |
732 | rxvt_privileges (IGNORE); |
734 | rxvt_privileges (IGNORE); |
733 | } |
735 | } |
734 | #endif |
736 | #endif |
735 | |
737 | |
… | |
… | |
873 | * Called after a window size change. |
875 | * Called after a window size change. |
874 | */ |
876 | */ |
875 | void |
877 | void |
876 | rxvt_term::tt_winch () |
878 | rxvt_term::tt_winch () |
877 | { |
879 | { |
878 | if (pty.pty < 0) |
880 | if (pty->pty < 0) |
879 | return; |
881 | return; |
880 | |
882 | |
881 | struct winsize ws; |
883 | struct winsize ws; |
882 | |
884 | |
883 | ws.ws_col = ncol; |
885 | ws.ws_col = ncol; |
884 | ws.ws_row = nrow; |
886 | ws.ws_row = nrow; |
885 | ws.ws_xpixel = width; |
887 | ws.ws_xpixel = width; |
886 | ws.ws_ypixel = height; |
888 | ws.ws_ypixel = height; |
887 | (void)ioctl (pty.pty, TIOCSWINSZ, &ws); |
889 | (void)ioctl (pty->pty, TIOCSWINSZ, &ws); |
888 | |
890 | |
889 | #if 0 |
891 | #if 0 |
890 | // TIOCSWINSZ⎈ is supposed to do this automatically and correctly |
892 | // TIOCSWINSZ⎈ is supposed to do this automatically and correctly |
891 | if (cmd_pid) /* force through to the command */ |
893 | if (cmd_pid) /* force through to the command */ |
892 | kill (-cmd_pid, SIGWINCH); |
894 | kill (-cmd_pid, SIGWINCH); |