*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/pxffork (3)              
Title
Content
Arch
Section
 

Contents


PXFFORK(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFFORK - Creates a process

SYNOPSIS    [Toc]    [Back]

     SUBROUTINE	PXFFORK	(ipid, ierror)
     INTEGER ipid, ierror

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, 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
     7.2 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.

     UNICOS and	UNICOS/mk systems only:

     * Record locks set	by the parent process are not inherited	by the
       child process (see fcntl(2) and lockf(3C)).

     * In a multitasking group,	only the process that executed the fork
       system call is copied.

     * Each attached shared memory segment is attached and the value of
       shm_nattch in the data structure	associated with	the shared memory
       segment is incremented by 1.

     IRIX systems only:

     * 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)).

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	systems, all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, 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.

     UNICOS and	UNICOS/mk systems only:

     EBUSY     If you attempt to enable	accounting when	it is already
	       enabled,	or if you issue	a restart(2) attempt when another
	       job or process in the system is using the jid or	any pid
	       associated with the job (or process) to be restarted.

     EINTR     If an asynchronous signal (such as interrupt or quit), which
	       you have	elected	to catch, occurred during a fork system
	       call.  When execution resumed after processing the signal,
	       the interrupted system call returned this error condition.

     EMEMLIM   If more memory space was	requested than is allowed for the
	       processes attached to this lnode. The maximum value is set
	       by the -c option	of the shradmin(8) command.  This error
	       appears only on systems running the fair-share scheduler.

     ENOEXEC   If a request was	made to	execute	a file that, although it
	       has the appropriate permissions,	does not start with a valid
	       magic number (see a.out(5)).

     ENOMEM    If during an exec(2) or sbreak(2) system	call, a	program
	       requested more space than the system could supply.  This	is
	       not a temporary condition; the maximum space specification
	       is a system parameter.

     EPROCLIM  If more processes were requested	than are allowed for this
	       lnode.  The maximum value is set	by the -p option of the
	       shradmin(8) command. This error appears only on systems
	       running the fair-share scheduler.

     IRIX systems only:

     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.

EXAMPLES    [Toc]    [Back]

	  program pxftest
	  integer ipid,	ierror

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

SEE ALSO    [Toc]    [Back]

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


     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

PXFFORK(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFFORK - Creates a process

SYNOPSIS    [Toc]    [Back]

     SUBROUTINE	PXFFORK	(ipid, ierror)
     INTEGER ipid, ierror

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, 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
     7.2 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.

     UNICOS and	UNICOS/mk systems only:

     * Record locks set	by the parent process are not inherited	by the
       child process (see fcntl(2) and lockf(3C)).

     * In a multitasking group,	only the process that executed the fork
       system call is copied.

     * Each attached shared memory segment is attached and the value of
       shm_nattch in the data structure	associated with	the shared memory
       segment is incremented by 1.

     IRIX systems only:

     * 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)).

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	systems, all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, 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.

     UNICOS and	UNICOS/mk systems only:

     EBUSY     If you attempt to enable	accounting when	it is already
	       enabled,	or if you issue	a restart(2) attempt when another
	       job or process in the system is using the jid or	any pid
	       associated with the job (or process) to be restarted.

     EINTR     If an asynchronous signal (such as interrupt or quit), which
	       you have	elected	to catch, occurred during a fork system
	       call.  When execution resumed after processing the signal,
	       the interrupted system call returned this error condition.

     EMEMLIM   If more memory space was	requested than is allowed for the
	       processes attached to this lnode. The maximum value is set
	       by the -c option	of the shradmin(8) command.  This error
	       appears only on systems running the fair-share scheduler.

     ENOEXEC   If a request was	made to	execute	a file that, although it
	       has the appropriate permissions,	does not start with a valid
	       magic number (see a.out(5)).

     ENOMEM    If during an exec(2) or sbreak(2) system	call, a	program
	       requested more space than the system could supply.  This	is
	       not a temporary condition; the maximum space specification
	       is a system parameter.

     EPROCLIM  If more processes were requested	than are allowed for this
	       lnode.  The maximum value is set	by the -p option of the
	       shradmin(8) command. This error appears only on systems
	       running the fair-share scheduler.

     IRIX systems only:

     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.

EXAMPLES    [Toc]    [Back]

	  program pxftest
	  integer ipid,	ierror

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

SEE ALSO    [Toc]    [Back]

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


     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

[ Back ]
 Similar pages
Name OS Title
pxfsetsid IRIX Creates a new session for a calling process
coredump Tru64 Creates a core snapshot of a running process
setsid Linux creates a session and sets the process group ID
nfork Tru64 Creates a child process (libnuma library)
sem_open Tru64 Opens/creates a named semaphore for use by a process (P1003.1b)
rad_fork Tru64 Creates a new process on a Resource Affinity Domain (libnuma library)
getppid HP-UX get process, process group and parent process ID.
getpid IRIX get process, process group, and parent process IDs
getppid Tru64 Get the process ID, process group ID, or parent process ID
getpgrp HP-UX get process, process group and parent process ID.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service