setspinfo(2) setspinfo(2)
setspinfo - set service provider information
#include <sys/extacct.h>
#include <unistd.h>
int setspinfo(struct acct_spi *spi);
The setspinfo function sets the service provider information for the
array session containing the current process to the contents of the
acct_spi struct pointed to by spi. Typically, this would only be done
when the array session is first created. The invoker must have superuser
privileges.
Service provider information is intended for use by software such as
batch queueing systems that need to maintain fairly static information
about an array session. It is included in session accounting records and
can be retrieved by any member of the array session. Ordinarily, the
service provider information for a new array session is inherited from
the array session of the process that created it; setspinfo can be used
to override this default behavior.
The service provider information itself has no particular meaning to
IRIX. For convenience, a suggested acct_spi struct is defined in the
<sys/extacct.h> header file and has the following layout:
struct acct_spi { /* Service provider information */
char spi_company[8]; /* Name of company providing service */
char spi_initiator[8]; /* Name of machine initiating job */
char spi_origin[16]; /* Name of queue */
char spi_spi[16]; /* Available for service provider */
char spi_spare[16]; /* reserved */
}
setspinfo is provided primarily for compatibility with older versions of
IRIX. A more general mechanism for setting the service provider
information, including the ability to save more or less than the 64 bytes
of data implied by acct_spi, is provided by the ARSOP_SETSPI function of
arsop(2).
setspinfo may fail if one or more of these conditions are true:
EFAULT spi points to an invalid location.
EPERM The current process does not have superuser privileges.
Page 1
setspinfo(2) setspinfo(2)
arsop(2), getspinfo(2), newarraysess(2), array_sessions(5), extacct(5).
Upon successful completion, setspinfo returns a value of 0. Otherwise, a
value of -1 is returned and errno is set to indicate the error.
PPPPaaaaggggeeee 2222 [ Back ]
|