Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ migrate(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec: execl, execv, execle, execve, execlp, execvp

fork, vfork

getspath, setspath

getxperm, setxperm

rexec: rexecl, rexecv, rexecle, rexecve, rexeclp, rexecvp

rfork

run: runl, runv, runle, runve, runlp, runvp



MIGRATE(2,L)                AIX Technical Reference                MIGRATE(2,L)



-------------------------------------------------------------------------------
migrate



PURPOSE

Moves a process to another cluster site.

SYNTAX

#include <sys/types.h>

int migrate(site_number)
siteno_t site_number;

DESCRIPTION

The migrate system call moves the calling process to a specified site.  If
site_number is 0, the site is chosen using the process's site path (see
"getspath, setspath").

If the chosen site is not the process's current site, an accounting record is
written indicating the process's utilization of the old site.

The new process (on the new site) is an exact copy of the calling process (on
the old site).  If the new site is the same as the old site, the call succeeds
but does nothing.  If the new site is not the old site, the new process
inherits the following attributes from the calling process:

  o Environment

  o Open files

  o Close-on-exec flag (see "exec:  execl, execv, execle, execve, execlp,
    execvp")

  o Signal handling settings (that is, SIG_DFL, SIG_IGN, and function address)

  o Signal mechanism new/old status (see "sigaction, sigvec, signal")

  o Set-user-ID and set-group-ID mode bits (see "setxuid")

  o Profiling on/off status

  o Nice value (see "getpriority, setpriority, nice")

  o Process ID

  o Parent process ID

  o Process group ID



Processed November 7, 1990       MIGRATE(2,L)                                 1





MIGRATE(2,L)                AIX Technical Reference                MIGRATE(2,L)




  o Session ID

  o TTY group ID (see "exit, _exit" and "sigaction, sigvec, signal")

  o Time left until an alarm clock signal (see "alarm")

  o Current working directory

  o Root directory

  o <LOCAL> alias path name (see "getlocal, setlocal")

  o File mode creation mask (see "umask")

  o File locks (see "fcntl, flock, lockf")

  o System resource limits (see "ulimit") and "getrlimit, setrlimit, vlimit")

  o Site path (see "getspath, setspath")

  o Execution site permissions (see "getxperm, setxperm").

If the new site is not the same as the old site, the new process will differ
from the calling process in that the new processes cutime, cstime, utime, and
stime, are modified as follows:

   cutime += utime;

   cstime += stime;

   utime = 0;

   stime = 0;

RETURN VALUE

Upon successful completion, a value of 0 is returned to the calling process.
Otherwise, a value of -1 is returned, the process continues on its old site,
and errno is set to indicate the error.

ERROR CONDITIONS

The migrate system call will fail if:

EAGAIN    The effective user ID is not superuser, and the system-imposed limit
          on the total number of processes under execution by a single user on
          the new site would be exceeded.

EBADST    site_number is out of range or the destination site is not the same
          CPU type as the current site.




Processed November 7, 1990       MIGRATE(2,L)                                 2





MIGRATE(2,L)                AIX Technical Reference                MIGRATE(2,L)



ESITEDN1  Operation failed because a required site is unavailable.

EPERM     Execute permission is not granted for site_number (when  not equal to
          0) or for any of the sites chosen by the site path (when site_number
          is 0).

ETABLE    On either the new site or the old site, the system's PID-site table,
          which is used to keep track of remote processes and process groups,
          is full.

ENLDEV    The process may not execute on the designated site because one of its
          open file descriptors is for a local-only object such as a socket or
          a non-tty character special file.  The process may not execute to
          another site if any TCP/IP sockets are open.

ELOCALONLY
          The process may not migrate because it has made use of shared memory,
          semaphores, message operations, too many child processes, or it is a
          DOS process (see DOS Merge User's and Administrator's Guide).

ENOSTORE  The current load module cannot be located from site site number
          because it has been deleted or superceded by a new version.

RESTRICTIONS

Note:  Processes may not execute to another site if:

         1. They have too many (85 or more) child processes.
         2. They have a file open which is marked as being in error (for
            instance, the storage site is not on the cluster network).
         3. They have made use of shared memory, semaphores, or messages
            operations.
         4. There are any TCP/IP sockets open.
         5. They have a character device open (other than a terminal or a null
            device).
         6. They have an open descriptor for a file that has been unlinked.

RELATED INFORMATION

In this book:  "exec:  execl, execv, execle, execve, execlp, execvp," "fork,
vfork," "getspath, setspath," "getxperm, setxperm," "rexec: rexecl, rexecv,
rexecle, rexecve, rexeclp, rexecvp," "rfork," and "run: runl, runv, runle,
runve, runlp, runvp."












Processed November 7, 1990       MIGRATE(2,L)                                 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026