Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #233
Difficulty: Easy
The goal of ARPANET, the precursor to the global Internet, was to exploit new computer technologies to meet the needs of military command and control against nuclear threats, achieve survivable control of US nuclear forces, and improve military tactical and management decision making.
True or False?
Linux & Unix Commands - Search Man Pages

ct_tmpl_clear(3contrac) [bsd man page]

ct_tmpl_activate(3CONTRACT)			       Contract Management Library Functions			       ct_tmpl_activate(3CONTRACT)

NAME
ct_tmpl_activate, ct_tmpl_clear, ct_tmpl_create, ct_tmpl_set_cookie, ct_tmpl_set_critical, ct_tmpl_set_informative, ct_tmpl_get_cookie, ct_tmpl_get_critical, ct_tmpl_get_informative - common contract template functions SYNOPSIS
cc [ flag... ] file... -D_LARGEFILE64_SOURCE -lcontract [ library... ] #include <libcontract.h> int ct_tmpl_activate(int fd); int ct_tmpl_clear(int fd); int ct_tmpl_create(int fd, ctid_t *idp); int ct_tmpl_set_cookie(int fd, uint64_t cookie); int ct_tmpl_set_critical(int fd, uint_t events); int ct_tmpl_set_informative(int fd, uint_t events); int ct_tmpl_get_cookie(int fd, uint64_t *cookiep); int ct_tmpl_get_critical(int fd, uint_t *eventsp); int ct_tmpl_get_informative(int fd, uint_t *eventsp); DESCRIPTION
These functions operate on contract template file descriptors obtained from the contract(4) file system. The ct_tmpl_activate() function makes the template referenced by the file descriptor fd the active template for the calling thread. The ct_tmpl_clear() function clears calling thread's active template. The ct_tmpl_create() function uses the template referenced by the file descriptor fd to create a new contract. If successful, the ID of the newly created contract is placed in *idp. The ct_tmpl_set_cookie() and ct_tmpl_get_cookie() functions write and read the cookie term of a contract template. The cookie term is ignored by the system, except to include its value in a resulting contract's status object. The default cookie term is 0. The ct_tmpl_set_critical() and ct_tmpl_get_critical() functions write and read the critical event set term. The value is a collection of bits as described in the contract type's manual page. The ct_tmpl_set_informative() and ct_tmpl_get_informative() functions write and read the informative event set term. The value is a collec- tion of bits as described in the contract type's manual page. RETURN VALUES
Upon successful completion, ct_tmpl_activate(), ct_tmpl_create(), ct_tmpl_set_cookie(), ct_tmpl_get_cookie(), ct_tmpl_set_critical(), ct_tmpl_get_critical(), ct_tmpl_set_informative(), and ct_tmpl_get_informative() return 0. Otherwise, they return a non-zero error value. ERRORS
The ct_tmpl_create() function will fail if: ERANGE The terms specified in the template were unsatisfied at the time of the call. EAGAIN The project.max-contracts resource control would have been exceeded. The ct_tmpl_set_critical() and ct_tmpl_set_informative() functions will fail if: EINVAL An invalid event was specified. The ct_tmpl_set_critical() function will fail if: EPERM One of the specified events was disallowed given other contract terms (see contract(4)) and {PRIV_CONTRACT_EVENT} was not in the effective set for the calling process. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libcontract(3LIB), contract(4), attributes(5), lfcompile(5) SunOS 5.10 1 Apr 2004 ct_tmpl_activate(3CONTRACT)

Check Out this Related Man Page

ct_tmpl_activate(3CONTRACT)			       Contract Management Library Functions			       ct_tmpl_activate(3CONTRACT)

NAME
ct_tmpl_activate, ct_tmpl_clear, ct_tmpl_create, ct_tmpl_set_cookie, ct_tmpl_set_critical, ct_tmpl_set_informative, ct_tmpl_get_cookie, ct_tmpl_get_critical, ct_tmpl_get_informative - common contract template functions SYNOPSIS
cc [ flag... ] file... -D_LARGEFILE64_SOURCE -lcontract [ library... ] #include <libcontract.h> int ct_tmpl_activate(int fd); int ct_tmpl_clear(int fd); int ct_tmpl_create(int fd, ctid_t *idp); int ct_tmpl_set_cookie(int fd, uint64_t cookie); int ct_tmpl_set_critical(int fd, uint_t events); int ct_tmpl_set_informative(int fd, uint_t events); int ct_tmpl_get_cookie(int fd, uint64_t *cookiep); int ct_tmpl_get_critical(int fd, uint_t *eventsp); int ct_tmpl_get_informative(int fd, uint_t *eventsp); DESCRIPTION
These functions operate on contract template file descriptors obtained from the contract(4) file system. The ct_tmpl_activate() function makes the template referenced by the file descriptor fd the active template for the calling thread. The ct_tmpl_clear() function clears calling thread's active template. The ct_tmpl_create() function uses the template referenced by the file descriptor fd to create a new contract. If successful, the ID of the newly created contract is placed in *idp. The ct_tmpl_set_cookie() and ct_tmpl_get_cookie() functions write and read the cookie term of a contract template. The cookie term is ignored by the system, except to include its value in a resulting contract's status object. The default cookie term is 0. The ct_tmpl_set_critical() and ct_tmpl_get_critical() functions write and read the critical event set term. The value is a collection of bits as described in the contract type's manual page. The ct_tmpl_set_informative() and ct_tmpl_get_informative() functions write and read the informative event set term. The value is a collec- tion of bits as described in the contract type's manual page. RETURN VALUES
Upon successful completion, ct_tmpl_activate(), ct_tmpl_create(), ct_tmpl_set_cookie(), ct_tmpl_get_cookie(), ct_tmpl_set_critical(), ct_tmpl_get_critical(), ct_tmpl_set_informative(), and ct_tmpl_get_informative() return 0. Otherwise, they return a non-zero error value. ERRORS
The ct_tmpl_create() function will fail if: ERANGE The terms specified in the template were unsatisfied at the time of the call. EAGAIN The project.max-contracts resource control would have been exceeded. The ct_tmpl_set_critical() and ct_tmpl_set_informative() functions will fail if: EINVAL An invalid event was specified. The ct_tmpl_set_critical() function will fail if: EPERM One of the specified events was disallowed given other contract terms (see contract(4)) and {PRIV_CONTRACT_EVENT} was not in the effective set for the calling process. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libcontract(3LIB), contract(4), attributes(5), lfcompile(5) SunOS 5.11 1 Apr 2004 ct_tmpl_activate(3CONTRACT)

Featured Tech Videos