Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3pool/pool_get_binding.3pool
Real path: /usr/share/man/man3pool/pool_get_binding.3pool
Zurück
'\" te .\" Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved. .TH pool_get_binding 3POOL "10 Feb 2020" "Oracle Solaris 11.4" "Pool Configuration Manipulation Library Functions" .SH NAME pool_get_binding, pool_set_binding, pool_get_resource_binding \- set and query process to resource pool bindings .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lpool\fR [ \fIlibrary\fR... ] #include <pool.h> \fBchar *\fR\fBpool_get_binding\fR(\fBpid_t\fR \fIpid\fR); .fi .LP .nf \fBint\fR \fBpool_set_binding\fR(\fBconst char *\fR\fIpool\fR, \fBidtype_t\fR \fIidtype\fR, \fBid_t\fR \fIid\fR); .fi .LP .nf \fBchar *\fR\fBpool_get_resource_binding\fR(\fBconst char *\fR\fItype\fR, \fBpid_t\fR \fIpid\fR); .fi .SH DESCRIPTION .sp .LP The \fBpool_get_binding()\fR function returns the name of the pool on the running system to which the given process is bound. .sp .LP The \fBpool_set_binding()\fR function binds a zone or processes matching \fIidtype\fR and \fIid\fR to the \fBpset\fR associated with pool on the running system. This function requires the privilege \fBPRIV_SYS_RES_BIND\fR or \fBPRIV_SYS_RES_CONFIG\fR. .sp .LP The \fIidtype\fR parameter can be one of the following types: .sp .ne 2 .mk .na \fB\fBP_PID\fR\fR .ad .RS 12n .rt The \fIid\fR parameter is a pid. .RE .sp .ne 2 .mk .na \fB\fBP_TASKID\fR\fR .ad .RS 12n .rt The \fIid\fR parameter is a taskid. Bind the running processes of a given task ID. .RE .sp .ne 2 .mk .na \fB\fBP_PROJID\fR\fR .ad .RS 12n .rt The \fIid\fR parameter is a project ID. Bind or query the running processes of a given project ID. .RE .sp .ne 2 .mk .na \fB\fBP_CTID\fR\fR .ad .RS 12n .rt The \fIid\fR parameter is a contract ID. Bind the running processes of a given contract ID. .RE .sp .ne 2 .mk .na \fB\fBP_ZONEID\fR\fR .ad .RS 12n .rt The \fIid\fR parameter is a zone ID. Bind the running processes of a given zone ID. .RE .sp .LP The \fBpool_get_resource_binding()\fR function returns the name of the resource of the supplied type to which the supplied process is bound. The only currently supported type is \fB"pset"\fR. .sp .LP The application must explicitly free the memory allocated for the return values for \fBpool_get_binding()\fR and \fBpool_get_resource_binding()\fR. .SH RETURN VALUES .sp .LP Upon successful completion, \fBpool_get_binding()\fR returns the name of the pool to which the process is bound. Otherwise it returns \fINULL\fR and \fBpool_error\fR(3POOL) returns the pool-specific error value. .sp .LP Upon successful completion, \fBpool_set_binding()\fR returns \fBPO_SUCCESS\fR. Otherwise, it returns \fBPO_FAIL\fR and \fBpool_error()\fR returns the pool-specific error value. .sp .LP Upon successful completion, \fBpool_get_resource_binding()\fR returns the name of the resource of the specified type to which the process is bound. Otherwise it returns \fINULL\fR and \fBpool_error()\fR returns the pool-specific error value. .SH ERRORS .sp .LP The \fBpool_get_binding()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBPOE_INVALID_CONF\fR\fR .ad .RS 20n .rt The configuration is invalid. .RE .sp .ne 2 .mk .na \fB\fBPOE_SYSTEM\fR\fR .ad .RS 20n .rt A system error has occurred. Check the system error code for more details. .RE .sp .LP The \fBpool_set_binding()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBPOE_INVALID_SEARCH\fR\fR .ad .RS 22n .rt The pool could not be found. .RE .sp .ne 2 .mk .na \fB\fBPOE_INVALID_CONF\fR\fR .ad .RS 22n .rt The configuration is invalid. .RE .sp .ne 2 .mk .na \fB\fBPOE_SYSTEM\fR\fR .ad .RS 22n .rt A system error has occurred. Check the system error code for more details. .RE .sp .LP The \fBpool_get_resource_binding()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBPOE_INVALID_CONF\fR\fR .ad .RS 20n .rt The configuration is invalid. .RE .sp .ne 2 .mk .na \fB\fBPOE_SYSTEM\fR\fR .ad .RS 20n .rt A system error has occurred. Check the system error code for more details. .RE .SH EXAMPLES .LP \fBExample 1\fR Bind the current process to the pool named "target". .sp .in +2 .nf #include <sys/types.h> #include <pool.h> #include <unistd.h> \&... id_t pid = getpid(); \&... if (pool_set_binding("target", P_PID, pid) == PO_FAIL) { (void) fprintf(stderr, "pool binding failed (%d)\en", pool_error()); } .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ CSI Enabled _ Interface Stability Uncommitted _ MT-Level Safe .TE .sp .SH SEE ALSO .sp .LP \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(7)