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

  man pages->IRIX man pages -> standard/newarraysess (2)              
Title
Content
Arch
Section
 

Contents


newarraysess(2)						       newarraysess(2)


NAME    [Toc]    [Back]

     newarraysess - start a new	array session

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     int newarraysess(void);

DESCRIPTION    [Toc]    [Back]

     The newarraysess function creates a new array session and moves the
     current process from its original array session to	the new	one.  The
     parents, children and siblings of the current process are not affected by
     this and remain in	their original array sessions.

     A handle for the new array	session	will be	generated by the system.
     Normally the new handle is	guaranteed to be unique	on the current system
     only, though some systems may be able to assign global array session
     handles that are unique across an entire array of systems by setting the
     asmachid system variable.	Otherwise, the range of	values that the	system
     may assign	for array session handles is defined by	the system variables
     min_local_paggid and max_local_paggid.  System variables can be examined
     and/or modified with systune(1).  If necessary, the setash(2) function
     can be used to override the default handle	after the array	session	has
     been created.

     The project ID and	service	provider information for the new array session
     are taken from the	original array session of the current process.	They
     can be changed after the new array	session	has been created using the
     setprid(2)	and setspinfo(2) functions.

     For the purposes of array session accounting, it is undefined whether the
     resources used by the current process are charged to the original array
     session, the new array session, or	split between both in some fashion.
     It	is guaranteed that the process resources will be charged to at least
     one of the	two array sessions, and	that if	the resources are split
     between the two array sessions, they will be split	cleanly	(in other
     words, no "double-billing"	will take place).

     Ordinarily, a new array session should be started whenever	the conceptual
     equivalent	of a login is performed.  This would include programs that do
     conventional logins (for example, login(1)	or telnet(1)) as well as
     programs that are essentially "logging in"	to do work on behalf of
     another user, such	as cron(1) or batch queueing systems.

     Using the arsop(2)	function, it is	possible to restrict the processes in
     an	array session from starting a new array	session.  If this has been
     done, then	newarraysess will fail with an EPERM error.

ERRORS    [Toc]    [Back]

     newarraysess may fail if the following condition is true:





									Page 1






newarraysess(2)						       newarraysess(2)



     ENOMEM    The system is unable to allocate	memory or other	resources for
	       the new array session.

     EPERM     The current array session has been restricted from starting new
	       array sessions.

     EINVAL    The current process is a	batch process (see miser(1) ). It is
	       not possible to create a	new array session for a	batch process.

SEE ALSO    [Toc]    [Back]

      
      
     systune(1), miser(1), arsop(2), setash(2),	setprid(2), setspinfo(2),
     array_sessions(5),	extacct(5).

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, newarraysess returns a	value of 0.
     Otherwise,	a value	of -1 is returned and errno is set to indicate the
     error.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
login HP-UX sign on; start terminal session
setash IRIX set array session handle
getash IRIX get array session handle
arsop IRIX perform an operation on an array session
akill IRIX terminate a process or array session
sid IRIX print the current array session handle and/or project ID
unpack IRIX Unpacks an array of rank one into an array under control of a mask
startnfs IRIX start nfs deamon.
execppp IRIX Start a PPP call.
lpsched HP-UX start the LP request scheduler,
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service