Print this page
OS-4818 contract template disappears on exec

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/contract/process.h
          +++ new/usr/src/uts/common/sys/contract/process.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2015 Joyent, Inc.
  24   25   */
  25   26  
  26   27  #ifndef _SYS_CONTRACT_PROCESS_H
  27   28  #define _SYS_CONTRACT_PROCESS_H
  28   29  
  29      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  30      -
  31   30  #include <sys/contract.h>
  32   31  #include <sys/time.h>
  33   32  
  34   33  #ifdef  __cplusplus
  35   34  extern "C" {
  36   35  #endif
  37   36  
  38   37  typedef struct ctmpl_process ctmpl_process_t;
  39   38  typedef struct cont_process cont_process_t;
  40   39  
↓ open down ↓ 7 lines elided ↑ open up ↑
  48   47   */
  49   48  #define CT_PR_SVC_FMRI_ZONE_ENTER       "svc:/system/zone_enter:default"
  50   49  
  51   50  /*
  52   51   * ctr_params flags
  53   52   */
  54   53  #define CT_PR_INHERIT   0x1     /* give contract to parent */
  55   54  #define CT_PR_NOORPHAN  0x2     /* kill when contract is abandoned */
  56   55  #define CT_PR_PGRPONLY  0x4     /* only kill process group on fatal errors */
  57   56  #define CT_PR_REGENT    0x8     /* automatically detach inherited contracts */
  58      -#define CT_PR_ALLPARAM  0xf
       57 +#define CT_PR_KEEP_EXEC 0x10    /* preserve template accross exec */
       58 +#define CT_PR_ALLPARAM  0x1f
  59   59  
  60   60  /*
  61   61   * ctr_ev_* flags
  62   62   */
  63   63  #define CT_PR_EV_EMPTY  0x1     /* contract is empty */
  64   64  #define CT_PR_EV_FORK   0x2     /* process was forked (and was added) */
  65   65  #define CT_PR_EV_EXIT   0x4     /* process exited (and left contract) */
  66   66  #define CT_PR_EV_CORE   0x8     /* process dumps core */
  67   67  #define CT_PR_EV_SIGNAL 0x10    /* process received fatal signal */
  68   68  #define CT_PR_EV_HWERR  0x20    /* process experienced uncorrectable error */
↓ open down ↓ 44 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX