Print this page
4736 spamming zlogin with SIGINT will halt the target zone

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zlogin/zlogin.c
          +++ new/usr/src/cmd/zlogin/zlogin.c
↓ open down ↓ 546 lines elided ↑ open up ↑
 547  547  }
 548  548  
 549  549  /*
 550  550   * Some signals (currently, SIGINT) must be forwarded on to the process
 551  551   * group of the child process.
 552  552   */
 553  553  static void
 554  554  sig_forward(int s)
 555  555  {
 556  556          if (child_pid != -1) {
 557      -                pid_t pgid = getpgid(child_pid);
 558      -                if (pgid != -1)
 559      -                        (void) sigsend(P_PGID, pgid, s);
      557 +                (void) sigsend(P_PGID, child_pid, s);
 560  558          }
 561  559  }
 562  560  
 563  561  /*
 564  562   * reset terminal settings for global environment
 565  563   */
 566  564  static void
 567  565  reset_tty()
 568  566  {
 569  567          (void) tcsetattr(save_fd, TCSADRAIN, &save_termios);
↓ open down ↓ 1712 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX