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

Technical Reference: Base Operating System and Extensions, Volume 2

ra_exec Subroutine

Purpose

Executes a file and attaches it to a given resource.

Library

Standard C library (libc.a)

Syntax

#include <sys/rset.h>
int ra_execl(rstype, rsid, flags, path, argument0 [,argument1,...], 0)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
const char * path, argument0, argument1,...;
int ra_execle(rstype, rsid, flags, path, argument0[,argument1,...], 0, envptr)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
const char * path, argument0, argument1,...;
char * const envptr[];
int ra_execlp(rstype, rsid, flags, File, argument0[,argument1,...], 0)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
const char * File, argument0, argument1,...;
int ra_execv (rstype, rsid, flags, path, argumentv)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
const char * path;
char * const argumentv[];
int ra_execve (rstype, rsid, flags, path, argumentv, envptr)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
const char * path;
char * const argumentv[], envptr[];
int ra_execvp (rstype, rsid, flags, File, argumentv)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
const char * File;
char * const argumentv[];
int ra_exect(rstype, rsid, flags, path, argumentv, envptr)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
char * path, argumentv, envptr[];

Description

The ra_exec subroutine in all its forms, executes a new program in the calling process, and attaches the process to the resource specified by the rstype and rsid parameters.

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

Note
When the exec subroutine is used, the new process image inherits its process' 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

The ra_exec subroutine has the same parameters as the exec subroutine, with the addition of the following new parameters:

rstype Specifies the type of resource the new process image will be attached to. This parameter must be the following, defined in rset.h:
  • R_RSET: resource set
rsid Identifies the resource the new process image 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_exec subroutine's return values are the same as the exec subroutine's return values.

Error Codes

The ra_exec subroutine's error codes are the same as the exec subroutine's error codes, with the addition of the following error codes:

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

The ra_fork Subroutine, 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 exec: execl, execle, execlp, execv, execve, execvp, or exect Subroutine in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1.

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