Deleted Added
full compact
port-solaris.c (162852) port-solaris.c (164146)
1/* $Id: port-solaris.c,v 1.2 2006/09/01 05:38:41 djm Exp $ */
1/* $Id: port-solaris.c,v 1.3 2006/10/31 23:28:49 dtucker Exp $ */
2
3/*
4 * Copyright (c) 2006 Chad Mynhier.
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *

--- 71 unchanged lines hidden (view full) ---

81 error("%s: open %s: %s", __func__,
82 CT_TEMPLATE, strerror(errno));
83 return;
84 }
85
86 debug2("%s: setting up process contract template on fd %d",
87 __func__, tmpl_fd);
88
2
3/*
4 * Copyright (c) 2006 Chad Mynhier.
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *

--- 71 unchanged lines hidden (view full) ---

81 error("%s: open %s: %s", __func__,
82 CT_TEMPLATE, strerror(errno));
83 return;
84 }
85
86 debug2("%s: setting up process contract template on fd %d",
87 __func__, tmpl_fd);
88
89 /* We have to set certain attributes before activating the template */
90 if (ct_pr_tmpl_set_fatal(tmpl_fd,
91 CT_PR_EV_HWERR|CT_PR_EV_SIGNAL|CT_PR_EV_CORE) != 0) {
89 /* First we set the template parameters and event sets. */
90 if (ct_pr_tmpl_set_param(tmpl_fd, CT_PR_PGRPONLY) != 0) {
91 error("%s: Error setting process contract parameter set "
92 "(pgrponly): %s", __func__, strerror(errno));
93 goto fail;
94 }
95 if (ct_pr_tmpl_set_fatal(tmpl_fd, CT_PR_EV_HWERR) != 0) {
92 error("%s: Error setting process contract template "
93 "fatal events: %s", __func__, strerror(errno));
94 goto fail;
95 }
96 error("%s: Error setting process contract template "
97 "fatal events: %s", __func__, strerror(errno));
98 goto fail;
99 }
96 if (ct_tmpl_set_critical(tmpl_fd, CT_PR_EV_HWERR) != 0) {
100 if (ct_tmpl_set_critical(tmpl_fd, 0) != 0) {
97 error("%s: Error setting process contract template "
98 "critical events: %s", __func__, strerror(errno));
99 goto fail;
100 }
101 error("%s: Error setting process contract template "
102 "critical events: %s", __func__, strerror(errno));
103 goto fail;
104 }
105 if (ct_tmpl_set_informative(tmpl_fd, CT_PR_EV_HWERR) != 0) {
106 error("%s: Error setting process contract template "
107 "informative events: %s", __func__, strerror(errno));
108 goto fail;
109 }
101
102 /* Now make this the active template for this process. */
103 if (ct_tmpl_activate(tmpl_fd) != 0) {
104 error("%s: Error activating process contract "
105 "template: %s", __func__, strerror(errno));
106 goto fail;
107 }
108 return;

--- 82 unchanged lines hidden ---
110
111 /* Now make this the active template for this process. */
112 if (ct_tmpl_activate(tmpl_fd) != 0) {
113 error("%s: Error activating process contract "
114 "template: %s", __func__, strerror(errno));
115 goto fail;
116 }
117 return;

--- 82 unchanged lines hidden ---