REXEC(2,L) AIX Technical Reference REXEC(2,L)
-------------------------------------------------------------------------------
rexec: rexecl, rexecv, rexecle, rexecve, rexeclp, rexecvp
PURPOSE
Executes a file on a given site.
SYNTAX
#include <sys/types.h>
rexecl(path, arg0, arg1, ..., argn, (char *)0, site_number)
char *path, *arg0, *arg1, ..., *argn;
siteno_t site_number;
rexecv(path, argv, site_number)
char *path, *argv[ ];
siteno_t site_number;
rexecle(path, arg0, arg1, ..., argn, (char *)0, envp, site_number)
char *path, *arg0, *arg1, ..., *argn, *envp[ ];
siteno_t site_number;
rexecve(path, argv, envp, site_number)
char *path, *argv[ ], *envp[ ];
siteno_t site_number;
rexeclp(file, arg0, arg1, ..., argn, (char *)0, site_number)
char *file, *arg0, *arg1, ..., *argn;
siteno_t site_number;
rexecvp(file, argv, site_number)
char *file, *argv[ ];
siteno_t site_number;
DESCRIPTION
The rexec family of system calls is only available with the Transparent
Computing Facility. The rexec family of system calls is just like the exec
family, except that it allows a site to be specified on which the new process
file will execute. If site_number is 0, rexec is exactly the same as exec.
The new process executes on the site specified by site_number. If site_number
is 0, the site is determined by the machine type on which the new process file
must run and by the site path (see "getspath, setspath").
If the name of the new process file refers to a hidden directory and
site_number is nonzero, rexec selects the new process file by using a site path
which consists only of the machine type corresponding to site_number. The new
process's site path is not affected.
Processed November 7, 1990 REXEC(2,L) 1
REXEC(2,L) AIX Technical Reference REXEC(2,L)
See "exec: execl, execv, execle, execve, execlp, execvp" for details
concerning the arguments to the various forms of rexec which are analogous to
those of exec.
Note: The rexec family of system calls may not execute a new program at
another site if the calling process has too many (85 or more) child
processes. A process may not use the rexec family of system calls to
execute a new program at another site if the process has a file open
which is marked as being in error (for instance, the storage site is not
on the network) or if the process has a character device open (other
than a terminal or the null device).
The rexec family of system calls may not execute a new program at
another site if the calling process has made use of shared memory.
RETURN VALUE
If rexec returns to the calling process, an error has occurred; the return
value is -1 and errno is set to indicate the error.
ERROR CONDITIONS
The rexec system call fails for any of the reasons listed for exec plus:
EBADST site_number is out of range.
FILES
/bin/sh Invoked if the shell program is found by rexeclp or rexecvp.
RELATED INFORMATION
In this book: "exec: execl, execv, execle, execve, execlp, execvp," "fork,
vfork," "getspath, setspath," "getxperm, setxperm," "migrate," "rfork," "run:
runl, runv, runle, runve, runlp, runvp," "a.out," and "environment."
Processed November 7, 1990 REXEC(2,L) 2