setsysinfo (ULTRIX) setsysinfo (ULTRIX)
NAME
getsysinfo, setsysinfo - Get and set the system information
DESCRIPTION
On DIGITAL UNIX systems, the setsysinfo() and getsysinfo() system calls
have been expanded to provide unaligned access control similar to that
found on ULTRIX systems. In addition, SSI_UACPROC and SSI_UACPARNT
options accept three other options as arguments:
-- UAC_NOPRINT
Suppresses the printing of the unaligned error message to the user.
-- UAC_NOFIX
Instructs the operating system not to fix the unaligned access fault.
-- UAC_SIGBUS
Forces a SIGBUS signal to be delivered to the thread.
These options are defined in sys/proc.h, and can 'be specified in any
combination on a per task basis.
UAC settings are inherited by children, so forked processes will have
the same UAC characteristics as their parent. The SSI_UACSYS option
only accepts the UAC_NOPRINT option and suppresses unaligned fixup mes‐
sages regardless of the users' setting. Only the super-user is allowed
to use this option.
The following example shows the setsysinfo() call usage in an applica‐
tion:
#include <sys/sysinfo.h>
#include <sys/proc.h>
.
.
.
int buf[2], val, arg;
.
.
.
/* Do not print the warning to the user */
buf[0] = SSIN_UACPROC;
buf[1] = UAC_NOPRINT;
error = setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0);
.
.
.
/* Do not print the warning and deliver a SIGBUS signal */
buf[0] = SSIN_UACPROC;
buf[1] = UAC_NOPRINT | UAC_SIGBUS;
error = setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0);
.
.
.
RELATED INFORMATION
Digital UNIX Functions:
getsysinfo(2), setsysinfo(2) delim off
setsysinfo (ULTRIX)