pxffork(3F)

PXFFORK - Creates a process

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.

NAME
     PXFFORK - Creates a process

SYNOPSIS
     SUBROUTINE PXFFORK (ipid, ierror)
     INTEGER ipid, ierror

DESCRIPTION
     This routine is in libfortran.so which is linked by default when
     compiling programs with the MIPSpro 7 Fortran 90 compiler or when
     compiling programs with the -craylibs option to the MIPSpro F77
     compiler.

     The PXFFORK routine uses the fork(2) system call to create a new
     process.  The child process is the same as the parent process except
     for the following:

     * The child process has a unique, currently unused process ID.

     * The child process has a different parent process ID. The child
       process's process ID is the parent process, or calling process, ID.

     * The child process has its own copy of the parent's file descriptors.
       Each of the child's file descriptors shares a common file pointer
       with the corresponding file descriptor of the parent process.

     * Process locks are not inherited by the child process (see plock(2)).

     * The utime, stime, cutime, and cstime of the child process are set to
       0.  The time left until an alarm clock signal is reset to 0.

     * All semadj values are cleared (see semop(2)).

     * The parent's set of pending signals are not inherited by the child.

     * File locks previously set by the parent are not inherited by the
       child (see fcntl(2)).

     * Page locks are not inherited (see mpin(2) on IRIX systems).

     * The time left until an itimer signal is reset to 0.

     * The child will not inherit the ability to make graphics calls.  The
       child process may receive a segmentation fault upon attempting to
       make a graphics call, unless it initializes itself as a graphics
       process via winopen() or ginit().  Currently, if the parent is a
       graphics process, the child's attempt to become a graphics process
       will fail.

     * The share mask is set to 0 (see sproc(2)).

     All arguments must be of default kind unless documented otherwise.  On
     IRIX systems, the default kind is KIND=4.

     The following is a list of arguments for this routine:

     ipid    An output integer variable. ipid will be zero for the child
             process and the process ID of the child for the parent
             process.

     ierror  An output integer variable that contains zero if PXFFORK was
             successful or nonzero if PXFFORK was not successful.

     The PXFFORK routine may return any of the following error values:

     EAGAIN    If the system-imposed limit on the total number of processes
               under execution in the whole system (NPROC) is exceeded or
               if the system-imposed limit on the total number of processes
               under execution by one user (CHILD_MAX) is exceeded.

     EAGAIN    If the amount of system memory required is temorarily
               unavailable.

     ENOSPC    If the caller is a member of a share group and the total
               number of share group members plus child processes exceeds
               the maximum number of users specified by the usconfig(3P)
               command (8 by default).  Any changes made with usconfig (3P)
               must be done Ibeforethe first sproc is formed.

     ENOLCK    There are not enough file locks in the system.

NOTES
     The PXF_DEFINITIONS module can be used by Fortran 90 users to enable
     caller-callee interface checking.

EXAMPLES
          program pxftest
          integer ipid, ierror

          CALL PXFFORK(ipid, ierror)
          if (ipid .eq. 0) then
             print *,'child'
          else
             print *,'parent'
          endif
          end

SEE ALSO
     exec(2), fcntl(2), fork(2), plock(2), restart(2), semop(2), sproc(2),
     ssbreak(2)
     shradmin(8)