[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

ra_fork Subroutine

Purpose

Creates and attaches a new process to a given resource.

Library

Standard C library (libc.a)

Syntax

#include <sys/rset.h>
pid_t ra_fork(rstype, rsid, flags)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;

Description

The ra_fork subroutine creates a new process, and attaches the new process to the resource set specified by rstype and rsid.

The following conditions must be met to successfully attach a process to a resource set:

Note
When the fork subroutine is used, the child process inherits its parent's resource set attachments.

Dynamic Processor Deallocation and DLPAR may invalidate the processor attachment that is being specified. A program must become DLPAR Aware to resolve this problem.

Parameters

rstype Specifies the type of resource the new process will be attached to. This parameter must be the following value, defined in rset.h.
  • R_RSET: resource set.
rsid Identifies the resource the new process will be attached to. This parameter must be a resource set handle.
  • Process ID (for rstype of R_PROCESS): set the rsid_t at_pid field to the desired process' process ID.
flags Reserved for future use. Specify as 0.

Return Values

The ra_fork subroutine's return values are the same as the fork subroutine's return values.

Error Codes

The ra_fork subroutine's error codes are the same as the fork subroutine's error codes with the addition of the following:

EINVAL One of the following is true:
  • The rstype parameter contains an invalid type identifier.
  • The flags parameter contains an invalid flags value.
ENODEV The specified resource set does not contain any available processors.
EFAULT Invalid address.
EPERM One of the following is true:
  • The calling process has neither root authority nor CAP_NUMA_ATTACH attachment privilege.
  • The calling process contains one or more threads with a bindprocessor processor binding.
  • The specified resource set is not included in the calling process' partition resource set.

Related Information

ra_attachrset Subroutine, ra_detachrset Subroutine, and ra_getrset Subroutine.

The Dynamic Logical Partitioning article in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

The dr_reconfig system call in AIX 5L Version 5.2 Technical Reference: Kernel and Subsystems Volume 1.

The fork, f_fork, or vfork Subroutine, and exec: execl, execle, execlp, execv, execve, execvp, or exect Subroutine articles in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 2.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]