cpusetAttachPID - attach a specific process to a cpuset


SYNOPSIS

       #include <cpuset.h>

       int cpusetAttachPID(qname, pid);

       char *qname;

       pid_t pid;


DESCRIPTION

       The  cpusetAttachPID function is used to attach a specific
       process identified by its PID to the cpuset identified  by
       qqnnaammee.   Every cpuset queue has a file that defines access
       permissions to the queue.   The  execute  permissions  for
       that  file will determine if a process owned by a specific
       user can attach a process to the cpuset queue.

       The qqnnaammee argument is the name of the cpuset to which  the
       specified  process should be attached.


EXAMPLES

       This  example  attaches  the  current  process to a cpuset
       queue named mpi_set.

            char *qname = "mpi_set";

            /* Attach to cpuset, if error - print error & exit */
            if (!cpusetAttachPID(qname, pid)) {
                perror("cpusetAttachPID");
                exit(1);
            }


NOTES

       cpusetAttachPID  is  found  in the library "libcpuset.so",
       and will be loaded if the option  --llccppuusseett  is  used  with
       cc(1) or ld(1).


RESTRICTIONS

       Not  all  of  the above capabilities are implemented.  See
       the RESTRICTIONS secion  in  manual  entry  cpuset(4)  for
       details.


SEE ALSO

       cpuset(1),      cpusetCreate(3x),     cpusetDetachPID(3x),
       cpuset(5).


DIAGNOSTICS

       If  successful,   cpusetAttachPID   returns   a   1.    If

       set to indicate the error.


Man(1) output converted with man2html