Lines Matching defs:contracts_fd
335 static int contracts_fd = -1;
347 if (contracts_fd == -1) {
348 if ((contracts_fd = open64(CTFS_ROOT "/process/template",
353 if ((errno = ct_pr_tmpl_set_param(contracts_fd, CT_PR_PGRPONLY)))
356 if ((errno = ct_tmpl_set_informative(contracts_fd, CT_PR_EV_HWERR)))
359 if ((errno = ct_pr_tmpl_set_fatal(contracts_fd, CT_PR_EV_HWERR)))
362 if ((errno = ct_tmpl_set_critical(contracts_fd, 0)))
367 if ((errno = ct_tmpl_activate(contracts_fd)))
374 if (contracts_fd != -1)
375 (void) close(contracts_fd);
377 contracts_fd = -1;
389 if (contracts_fd == -1)
392 if ((errno = (ct_tmpl_clear(contracts_fd))))
398 (void) close(contracts_fd);
400 contracts_fd = -1;
412 if (contracts_fd == -1)
415 if ((errno = ct_tmpl_clear(contracts_fd)))