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
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
|
↓ 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
41 40 /*
42 41 * Default value for FMRI terms
43 42 */
44 43 #define CT_PR_SVC_DEFAULT "inherit:"
45 44
46 45 /*
47 46 * zone_enter() pseudo-FMRI
|
↓ 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 */
69 69 #define CT_PR_ALLEVENT 0x3f
70 70 #define CT_PR_ALLFATAL (CT_PR_EV_CORE | CT_PR_EV_SIGNAL | CT_PR_EV_HWERR)
71 71
72 72 /*
73 73 * ctp_id values
74 74 */
75 75 #define CTPP_EV_FATAL 0
76 76 #define CTPP_PARAMS 1
77 77 #define CTPP_SUBSUME 2
78 78 #define CTPP_SVC_FMRI 3
79 79 #define CTPP_SVC_CTID 4
80 80 #define CTPP_SVC_CREATOR 5
81 81 #define CTPP_CREATOR_AUX 6
82 82
83 83 /*
84 84 * Status fields
85 85 */
86 86 #define CTPS_PARAMS "ctps_params"
87 87 #define CTPS_EV_FATAL "ctps_ev_fatal"
88 88 #define CTPS_MEMBERS "ctps_members"
89 89 #define CTPS_CONTRACTS "ctps_contracts"
90 90 #define CTPS_SVC_FMRI "ctps_svc_fmri"
91 91 #define CTPS_SVC_CTID "ctps_svc_ctid"
92 92 #define CTPS_SVC_CREATOR "ctps_svc_creator"
93 93 #define CTPS_CREATOR_AUX "ctps_creator_aux"
94 94
95 95 /*
96 96 * Event fields
97 97 */
98 98 #define CTPE_PID "ctpe_pid"
99 99 #define CTPE_PPID "ctpe_ppid"
100 100 #define CTPE_ZCOREFILE "ctpe_zcorefile"
101 101 #define CTPE_GCOREFILE "ctpe_gcorefile"
102 102 #define CTPE_PCOREFILE "ctpe_pcorefile"
103 103 #define CTPE_SIGNAL "ctpe_signal"
104 104 #define CTPE_SENDER "ctpe_sender"
105 105 #define CTPE_SENDCT "ctpe_sendct"
106 106 #define CTPE_EXITSTATUS "ctpe_exitstatus"
107 107
108 108 #ifdef __cplusplus
109 109 }
110 110 #endif
111 111
112 112 #endif /* _SYS_CONTRACT_PROCESS_H */
|
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX