50 lines
1.7 KiB
Groff
50 lines
1.7 KiB
Groff
.TH setash 2
|
|
.SH NAME
|
|
setash \- set array session handle
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\f3#include <sys/types.h>\f1
|
|
\f3#include <unistd.h>\f1
|
|
.sp .8v
|
|
\f3#int setash(ash_t ash);\f1
|
|
.fi
|
|
.SH DESCRIPTION
|
|
The \f2setash\f1 function changes the handle for the array session
|
|
containing the current process to the value specified by \f2ash\f1.
|
|
The current process must have superuser privileges to invoke
|
|
\f2setash\f1.
|
|
.PP
|
|
Ordinarily, a handle that is unique within the current system is
|
|
assigned to an array session when the array session is created using
|
|
the \f2newarraysess\f1(2) function.
|
|
The \f2setash\f1 function can be used to override this default handle,
|
|
perhaps for assigning a handle that is unique across an entire array
|
|
or for synchronizing handles with an array session on another system.
|
|
.PP
|
|
The handle specified by \f2ash\f1 must be a positive value, must not
|
|
be in use on the current system, and must not be in the range of
|
|
values that IRIX uses for default array session handles.
|
|
This range of default handles is defined by the system variables
|
|
\f3minash\f1 and \f3maxash\f1 and can be examined and/or modified
|
|
using \f2systune\f1(1).
|
|
.SH ERRORS
|
|
\f2setash\f1 may fail if one or more of these conditions are true:
|
|
.TP 10
|
|
\f3EINVAL\f1
|
|
\f2ash\f1 is negative, in use by another array session on
|
|
this system, or in the range of values reserved by the system for
|
|
default array session handles.
|
|
.TP
|
|
\f3EPERM\f1
|
|
The current process does not have superuser privileges.
|
|
.PP
|
|
.SH SEE ALSO
|
|
systune(1),
|
|
getash(2),
|
|
newarraysess(2),
|
|
array_sessions(5).
|
|
.SH "DIAGNOSTICS"
|
|
Upon successful completion, \f2setash\f1 returns a value of 0.
|
|
Otherwise, a value of -1 is returned and \f3errno\f1 is set to
|
|
indicate the error.
|