… | |
… | |
547 | } |
547 | } |
548 | else if (cmd.type == command::destroy) |
548 | else if (cmd.type == command::destroy) |
549 | { |
549 | { |
550 | rxvt_ptytty **pty = find (ptys.begin (), ptys.end (), cmd.id); |
550 | rxvt_ptytty **pty = find (ptys.begin (), ptys.end (), cmd.id); |
551 | |
551 | |
552 | if (*pty) |
552 | if (pty) |
553 | { |
553 | { |
|
|
554 | delete *pty; |
554 | ptys.erase (pty); |
555 | ptys.erase (pty); |
555 | delete *pty; |
|
|
556 | } |
556 | } |
557 | } |
557 | } |
558 | else |
558 | else |
559 | break; |
559 | break; |
560 | } |
560 | } |
… | |
… | |
590 | |
590 | |
591 | // server, pty-helper |
591 | // server, pty-helper |
592 | sock_fd = sv[1]; |
592 | sock_fd = sv[1]; |
593 | |
593 | |
594 | for (int fd = 0; fd < 1023; fd++) |
594 | for (int fd = 0; fd < 1023; fd++) |
595 | if (fd != sock_fd) |
595 | if (fd != sock_fd && fd != 1) |
596 | close (fd); |
596 | close (fd); |
597 | |
597 | |
598 | serve (); |
598 | serve (); |
599 | _exit (EXIT_SUCCESS); |
599 | _exit (EXIT_SUCCESS); |
600 | } |
600 | } |