Print this page
OS-3820 lxbrand ptrace(2): the next generation
OS-3685 lxbrand PTRACE_O_TRACEFORK race condition
OS-3834 lxbrand 64-bit strace(1) reports 64-bit process as using x32 ABI
OS-3794 lxbrand panic on init signal death
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Bryan Cantrill <bryan@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/proc/prcontrol.c
          +++ new/usr/src/uts/common/fs/proc/prcontrol.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
  28      - * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
       28 + * Copyright 2015, Joyent, Inc.
  29   29   */
  30   30  
  31   31  #include <sys/types.h>
  32   32  #include <sys/uio.h>
  33   33  #include <sys/param.h>
  34   34  #include <sys/cmn_err.h>
  35   35  #include <sys/cred.h>
  36   36  #include <sys/policy.h>
  37   37  #include <sys/debug.h>
  38   38  #include <sys/errno.h>
↓ open down ↓ 1435 lines elided ↑ open up ↑
1474 1474                                  } while ((tx = tx->t_forw) != p->p_tlist);
1475 1475                          }
1476 1476                  }
1477 1477                  thread_lock(t);
1478 1478                  if (ISWAKEABLE(t) || ISWAITING(t)) {
1479 1479                          /* Set signaled sleeping/waiting lwp running */
1480 1480                          setrun_locked(t);
1481 1481                  } else if (t->t_state == TS_STOPPED && sig == SIGKILL) {
1482 1482                          /* If SIGKILL, set stopped lwp running */
1483 1483                          p->p_stopsig = 0;
1484      -                        t->t_schedflag |= TS_XSTART | TS_PSTART;
     1484 +                        t->t_schedflag |= TS_XSTART | TS_PSTART | TS_BSTART;
1485 1485                          t->t_dtrace_stop = 0;
1486 1486                          setrun_locked(t);
1487 1487                  }
1488 1488                  t->t_sig_check = 1;     /* so ISSIG will be done */
1489 1489                  thread_unlock(t);
1490 1490                  /*
1491 1491                   * More jobcontrol side-effects.
1492 1492                   */
1493 1493                  if (sig == SIGCONT && (tx = p->p_tlist) != NULL) {
1494 1494                          p->p_stopsig = 0;
↓ open down ↓ 1058 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX