Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 3: Extended Library Functions Oracle Solaris 10 1/13 Information Library |
Extended Library Functions - Part 1
Extended Library Functions - Part 2
Extended Library Functions - Part 3
Extended Library Functions - Part 4
Extended Library Functions - Part 5
ptree_add_row_to_table(3PICLTREE)
ptree_create_and_add_node(3PICLTREE)
ptree_create_and_add_prop(3PICLTREE)
ptree_get_first_prop(3PICLTREE)
ptree_get_frutree_parent(3PICLTREE)
ptree_get_next_by_col(3PICLTREE)
ptree_get_next_by_row(3PICLTREE)
ptree_get_next_prop(3PICLTREE)
ptree_get_node_by_path(3PICLTREE)
ptree_get_prop_by_name(3PICLTREE)
ptree_get_propinfo_by_name(3PICLTREE)
ptree_get_propval_by_name(3PICLTREE)
ptree_init_propinfo(3PICLTREE)
ptree_register_handler(3PICLTREE)
ptree_unregister_handler(3PICLTREE)
ptree_update_propval(3PICLTREE)
ptree_update_propval_by_name(3PICLTREE)
ptree_walk_tree_by_class(3PICLTREE)
rsm_create_localmemory_handle(3RSM)
rsm_free_interconnect_topology(3RSM)
rsm_free_localmemory_handle(3RSM)
rsm_get_interconnect_topology(3RSM)
rsm_intr_signal_wait_pollfd(3RSM)
rsm_memseg_export_create(3RSM)
rsm_memseg_export_destroy(3RSM)
rsm_memseg_export_publish(3RSM)
rsm_memseg_export_rebind(3RSM)
rsm_memseg_export_republish(3RSM)
rsm_memseg_export_unpublish(3RSM)
rsm_memseg_import_close_barrier(3RSM)
rsm_memseg_import_connect(3RSM)
rsm_memseg_import_destroy_barrier(3RSM)
rsm_memseg_import_disconnect(3RSM)
rsm_memseg_import_get_mode(3RSM)
rsm_memseg_import_init_barrier(3RSM)
rsm_memseg_import_open_barrier(3RSM)
rsm_memseg_import_order_barrier(3RSM)
rsm_memseg_import_set_mode(3RSM)
rsm_memseg_release_pollfd(3RSM)
SCF_Card_exchangeAPDU(3SMARTCARD)
SCF_Card_waitForCardRemoved(3SMARTCARD)
scf_entry_destroy_children(3SCF)
scf_instance_get_pg_composed(3SCF)
scf_instance_get_snapshot(3SCF)
scf_iter_instance_pgs_composed(3SCF)
scf_iter_instance_pgs_typed(3SCF)
scf_iter_instance_pgs_typed_composed(3SCF)
scf_iter_instance_snapshots(3SCF)
scf_iter_property_values(3SCF)
scf_iter_service_instances(3SCF)
scf_iter_service_pgs_typed(3SCF)
scf_iter_snaplevel_pgs_typed(3SCF)
scf_pg_get_parent_instance(3SCF)
scf_pg_get_parent_service(3SCF)
scf_pg_get_parent_snaplevel(3SCF)
scf_pg_get_underlying_pg(3SCF)
scf_service_add_instance(3SCF)
scf_service_get_instance(3SCF)
SCF_Session_freeInfo(3SMARTCARD)
SCF_Session_getInfo(3SMARTCARD)
SCF_Session_getSession(3SMARTCARD)
SCF_Session_getTerminal(3SMARTCARD)
scf_simple_app_props_free(3SCF)
scf_simple_app_props_get(3SCF)
scf_simple_app_props_next(3SCF)
scf_simple_app_props_search(3SCF)
scf_simple_prop_next_astring(3SCF)
scf_simple_prop_next_boolean(3SCF)
scf_simple_prop_next_count(3SCF)
scf_simple_prop_next_integer(3SCF)
scf_simple_prop_next_opaque(3SCF)
scf_simple_prop_next_reset(3SCF)
scf_simple_prop_next_time(3SCF)
scf_simple_prop_next_ustring(3SCF)
scf_simple_prop_numvalues(3SCF)
scf_simple_walk_instances(3SCF)
scf_snaplevel_get_instance_name(3SCF)
scf_snaplevel_get_next_snaplevel(3SCF)
scf_snaplevel_get_parent(3SCF)
scf_snaplevel_get_scope_name(3SCF)
scf_snaplevel_get_service_name(3SCF)
scf_snapshot_get_base_snaplevel(3SCF)
SCF_Terminal_addEventListener(3SMARTCARD)
SCF_Terminal_close(3SMARTCARD)
SCF_Terminal_freeInfo(3SMARTCARD)
SCF_Terminal_getCard(3SMARTCARD)
SCF_Terminal_getInfo(3SMARTCARD)
SCF_Terminal_removeEventListener(3SMARTCARD)
SCF_Terminal_updateEventListener(3SMARTCARD)
SCF_Terminal_waitForCardAbsent(3SMARTCARD)
SCF_Terminal_waitForCardPresent(3SMARTCARD)
scf_transaction_destroy_children(3SCF)
scf_transaction_property_change(3SCF)
scf_transaction_property_change_type(3SCF)
scf_transaction_property_delete(3SCF)
scf_transaction_property_new(3SCF)
scf_transaction_reset_all(3SCF)
scf_value_get_as_string_typed(3SCF)
- associate a user process with a project
cc [ flag … ] file… -lproject [ library … ] #include <project.h> int setproject(const char *project_name, const char *user_name, uint_t flags);
The setproject() function provides a simplified method for the association of a user process with a project and its various resource management attributes, as stored in the project(4) name service database. These attributes include resource control settings, resource pool membership, and third party attributes (which are ignored by setproject().)
If user_name is a valid member of the project specified by project_name, as determined by inproj(3PROJECT), setproject() will create a new task with settaskid(2) using task flags specified by flags, use setrctl(2) to associate various resource controls with the process, task, and project, and bind the calling process to the appropriate resource pool with pool_set_binding(3POOL). Resource controls not explicitly specified in the project entry will be preserved. If user_name is a name of the superuser (user with UID equal to 0), the setproject() function skips the inproj(3PROJECT) check described above and allows the superuser to join any project.
The current process will not be bound to a resource pool if the resource pools facility (see pooladm(1M)) is inactive. The setproject() function will succeed whether or not the project specified by project_name specifies a project.pool attribute. If the resource pools facility is active, setproject() will fail if the project does not specify a project.pool attribute and there is no designated pool accepting default assignments. The setproject() function will also fail if there is a specified project.pool attribute for a nonexistent pool.
Upon successful completion, setproject() returns 0. If any of the resource control assignments failed but the project assignment, pool binding, and task creation succeeded, an integer value corresponding to the offset into the key-value pair list of the failed attribute assignment is returned. If the project assignment or task creation was not successful, setproject() returns SETPROJ_ERR_TASK and sets errno to indicate the error. In the event of a pool binding failure, setproject() returns SETPROJ_ERR_POOL and sets errno to indicate the error. Additional error information can be retrieved from pool_error(3POOL).
The setproject() function will fail during project assignment or task creation if:
The invoking task was created with the TASK_FINAL flag.
A resource control limiting the number of LWPs or tasks in the target project or zone has been exceeded.
A resource control on the given project would be exceeded.
The project ID associated with the given project is not within the range of valid project IDs, invalid flags were specified, or user_name is NULL.
The effective user of the calling process is not superuser.
The specified user is not a valid user of the given project, user_name is not valid user name, or project_name is not valid project name.
The setproject() function will fail during pool binding if:
No resource pool accepting default bindings exists.
The effective user of the calling process is not superuser.
The specified resource pool is unknown
If setproject() returns an offset into the key-value pair list, the returned error value is associated with setrctl(2) for resource control attributes.
The setproject() function recognizes a name-structured value pair for the attributes in the project(4) database with the following format:
entity.control=(privilege,value,action,action,…),…
where privilege is one of BASIC or PRIVILEGED, value is a numeric value with optional units, and action is one of none, deny, and signal=signum or signal=SIGNAME. For instance, to set a series of progressively more assertive control values on a project's per-process CPU time, specify
process.max-cpu-time=(PRIVILEGED,1000s,signal=SIGXRES), \ (PRIVILEGED,1250, signal=SIGTERM),(PRIVILEGED,1500, signal=SIGKILL)
To prevent a task from exceeding a total of 128 LWPs, specify a resource control with
task.max-lwps=(PRIVILEGED,128,deny)
Specifying a resource control name with no values causes all resource control values for that name to be cleared on the given project, leaving only the system resource control value on the specified resource control name.
For example, to remove all resource control values on shared memory, specify:
project.max-shm-memory
The project attribute, project.pool, specifies the pool to which processes associated with the project entry should be bound. Its format is:
project.pool=pool_name
where pool_name is a valid resource pool within the active configuration enabled with pooladm(1M).
The final attribute is used to finalize the task created by setproject(). Seesettaskid(2).
task.final
All further attempts to create new tasks, such as using newtask(1) and su(1M), will fail.
See attributes(5) for descriptions of the following attributes:
|
pooladm(1M), setrctl(2), settaskid(2), inproj(3PROJECT), libproject(3LIB), pool_error(3POOL), pool_set_binding(3POOL), passwd(4), project(4), attributes(5)