Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro(2) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(2)

ioctl(2)

open(2)

pipe(2)

read(2)

write(2)

tro(3)

perror(3)




intro(2) intro(2)
NAME intro - introduction to system calls and error numbers SYNOPSIS #include <errno.h> DESCRIPTION This section describes all of the A/UX(Reg.) system calls. The system calls identified with the letter ``P'' following the section number are part of the A/UX POSIX environment. The A/UX POSIX programming environment is described in the A/UX Guide to POSIX and A/UX Programming Languages and Tools, Volume 1. Most of these calls have one or more error returns. An error condition is indicated by a returned value that is otherwise impossible, which is almost always -1. The individual descriptions specify the details. An error number is also made available in the external variable errno, which is not cleared on successful calls. So errno, should be tested only after an error has been indicated. There is a table of messages associated with each error and a routine for printing the message (see perror(3C)). Each system-call description attempts to list all possible error numbers. ERRORS The following is a complete list of A/UX error numbers and their names as defined in <errno.h>. Also given is a description of the most likely cause of the error. 1 EPERM Not owner Typically this error indicates an attempt to modify a file in some way forbidden except to its owner or the superuser. It is also returned when ordinary users at- tempt modifications reserved for the superuser. 2 ENOENT No such file or directory This error occurs when a filename is specified and the file should exist but doesn't, or when one of the directories in a pathname does not exist. 3 ESRCH No such process No process can be found corresponding to that specified by pid in kill or ptrace. 4 EINTR Interrupted system call An asynchronous signal, such as an interrupt or quit, which the user program elected to catch, occurred dur- ing a system call. If execution is resumed after pro- cessing the signal, it will appear as if the interrupt- ed system call returned this error condition. April, 1990 1



intro(2) intro(2)
5 EIO I/O error Some physical I/O error has occurred. This error may in some cases occur on a call following the one to which it actually applies. 6 ENXIO No such device or address I/O on a special file refers to a subdevice that does not exist or is beyond the limits of the device. It may also occur when, for example, a tape drive is not online or if a disk pack is not loaded on a drive. 7 E2BIG Argument list too long An argument list longer than ARG_MAX is presented to a member of the exec family. 8 ENOEXEC exec format error A request is made to execute a file which, although it has the appropriate permissions, does not start with a valid magic number (see a.out(4)). 9 EBADF Bad file number Either a file descriptor does not refer to an open file, or a read/write request is made to a file that is open only for writing/reading. 10 ECHILD No children A wait was executed by a process that did not have ex- isting child processes waiting for it. 11 EAGAIN No more processes The system is out of a resource that may be available later. A fork failed because the system's process table is full or the user is not allowed to create any more processes. A system call that requires memory may also fail with this error if the system is out of memory or swap space, but the request is less than the system-imposed per process limit (see ulimit(2)). 12 ENOMEM Not enough space During an exec, brk, or sbrk, a program asks for more space than the system is able to supply. This is not a temporary condition; the maximum space size is a system parameter. The error may also occur if the arrangement of text, data, and stack segments requires too many segmentation registers or if there is not enough swap space during a fork. 13 EACCES Permission denied An attempt was made to access a file in a way forbidden by the protection system. 14 EFAULT Bad address 2 April, 1990



intro(2) intro(2)
The system encountered a hardware fault when attempting to use an argument of a system call. 15 ENOTBLK Block device required A nonblock file was mentioned where a block device was required, for example, in mount. 16 EBUSY Mount device busy The device or resource is currently unavailable. An attempt was made to mount a device that was already mounted or to dismount a device on which there is an active file (open file, current directory, mounted-on file, or active text segment). This error also occurs if an attempt is made to enable accounting that is al- ready enabled. 17 EEXIST File exists An existing file was mentioned in an inappropriate con- text, for example, link. 18 EXDEV Cross-device link A link to a file on another device was attempted. 19 ENODEV No such device An attempt was made to apply an inappropriate system call to a device, for example, to read a write-only device. 20 ENOTDIR Not a directory A nondirectory was specified where a directory is re- quired, for example, in a path prefix or as an argument to chdir(2). 21 EISDIR Is a directory An attempt was made to write on a directory. 22 EINVAL Invalid argument An invalid argument was implemented-for example, dismounting a nonmounted device, mentioning an unde- fined signal in signal or kill, reading or writing a file for which lseek has generated a negative pointer. This error is also generated by the math functions described in the (3M) entries of this manual. 23 ENFILE File table overflow The system file table is full and temporarily cannot accept another open. 24 EMFILE Too many open files A process may not have more than the maximum number of file descriptors (OPEN_MAX) open at a time. When a record lock is being created with fcntl, too many files April, 1990 3



intro(2) intro(2)
have record locks on them. 25 ENOTTY Not a typewriter An attempt was made to ioctl(2) a file that is not a character device file. 26 ETXTBSY Text file busy An attempt was made to execute a pure-procedure program that is currently open for writing, or an attempt was made to open for writing a pure-procedure program currently being executed. Note: If you are running a network file system (NFS) and you are accessing a shared binary re- motely, it is possible that you will not get this errno. 27 EFBIG File too large The size of a file exceeded the maximum file size given in ULIMIT (see ulimit(2)). 28 ENOSPC No space left on device During a write to an ordinary file, no free space is left on the device. In fcntl, the setting or removing of record locks on a file cannot be accomplished be- cause no more record entries are left on the system. 29 ESPIPE Illegal seek An lseek was issued to a pipe. This error should also be issued for other nonseekable devices. 30 EROFS Read-only file system An attempt to modify a file or directory was made on a device mounted read-only. 31 EMLINK Too many links An attempt was made to create more than the maximum number of links (LINK_MAX) to a file. 32 EPIPE Broken pipe A write was attempted to a pipe on which there is no process to read the data. This condition normally gen- erates a signal; the error is returned if the signal is ignored. 33 EDOM Argument out of domain of function The argument of a function in the math package (3M) is beyond the domain of the function. 34 ERANGE Math result not representable The value of a function in the math package (3M) is not 4 April, 1990



intro(2) intro(2)
representable within machine precision. 35 ENOMSG No message of desired type An attempt was made to receive a message of a type that does not exist on the specified message queue (see msgop(2)). 36 EIDRM Identifier removed This error is returned to processes that resume execu- tion due to the removal of an identifier from the name space of the file system (see msgctl(2), semctl(2), and shmctl(2)). 37 ECHRNG Channel number out of range This errno is included for compatibility with AT&T. 38 EL2NSYNC Level 2 not synchronized This errno is included for compatibility with AT&T. 39 EL3HLT Level 3 halted This errno is included for compatibility with AT&T. 40 EL3RST Level 3 reset This errno is included for compatibility with AT&T. 41 ELNRNG Link number out of range This errno is included for compatibility with AT&T. 42 EUNATCH Protocol driver not attached This errno is included for compatibility with AT&T. 43 ENOCSI No CSI structure available This errno is included for compatibility with AT&T. 44 EL2HLT Level 2 halted This errno is included for compatibility with AT&T. 45 EDEADLK Deadlock A deadlock situation was detected and avoided. 55 EWOULDBLOCK Operation would block An operation that would cause a process to block was attempted on an object in nonblocking mode (see socket(2N) and setcompat(2)). 56 EINPROGRESS Operation now in progress An operation that takes a long time to complete, such as connect(2N), was started on a nonblocking object (see socket(2N)). 57 EALREADY Operation already in progress An operation was attempted on a nonblocking object that April, 1990 5



intro(2) intro(2)
already had an operation in progress. 58 ENOTSOCK Socket operation on nonsocket A socket operation was attempted on an object that is not a socket. 59 EDESTADDRREQ Destination address required A required address was omitted from an operation on a socket. 60 EMSGSIZE Message too long A message sent on a socket was larger than the internal message buffer. 61 EPROTOTYPE Protocol wrong type for socket A protocol was specified that does not support the se- mantics of the socket type requested. For example, you cannot use the internet UDP protocol with type SOCK_STREAM. 62 ENOPROTOOPT Bad protocol option A bad option was specified in getsockopt(2) or setsockopt(2). 63 EPROTONOSUPPORT Protocol not supported The protocol has not been configured into the system, or there is no implementation for it. 64 ESOCKTNOSUPPORT Socket type not supported The support for the socket type has not been configured into the system, or there is no implementation for it. 65 EOPNOTSUPP Operation not supported on socket The support for the operation on the selected socket type has not been configured, or there is no implemen- tation for it- for example, trying to establish a con- nection on a datagram socket. 66 EPFNOSUPPORT Protocol family not supported The protocol family has not been configured into the system, or there is no implementation for it. 67 EAFNOSUPPORT Address not supported by protocol family An address incompatible with the requested protocol was used. For example, PUP Internet addresses cannot necessarily be used with ARPANET protocols. 68 EADDRINUSE Address already in use Only one usage of each address is normally permitted. 69 EADDRNOTAVAIL Can't assign requested address Normally results from an attempt to create a socket 6 April, 1990



intro(2) intro(2)
with an address not on this machine. 70 ENETDOWN Network is down A socket operation encountered a dead network. 71 ENETUNREACH Network is unreachable A socket operation was attempted to an unreachable net- work. 72 ENETRESET Network dropped connection on reset The connected host crashed and rebooted. 73 ECONNABORTED Software caused connection abort A connection abort was caused that was internal to the host machine. 74 ECONNRESET Connection reset by peer A connection was forcibly closed by a peer. This nor- mally results from the peer executing shutdown(2). 75 ENOBUFS No buffer space available An operation on a socket or pipe was not performed be- cause the system lacked sufficient buffer space. 76 EISCONN Socket is already connected A connect request was made on an already connected socket; or a sendto or sendmsg request on a connected socket specified a destination other than the connected party. 77 ENOTCONN Socket is not connected A request to send or receive data was disallowed be- cause the socket had already been shut down with a pre- vious shutdown(2). 78 ESHUTDOWN Can't send after socket shutdown A request to send data was disallowed because the sock- et had already been shut down with a previous shut- down(2). 80 ETIMEDOUT Connection timed out A connect request failed because the connected party did not properly respond after a period of time. (The timeout period is dependent on the communications pro- tocol.) 81 ECONNREFUSED Connection refused No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host. April, 1990 7



intro(2) intro(2)
82 ELOOP Too many levels of symbolic links A pathname lookup involved more than eight symbolic links. 83 ENAMETOOLONG Filename too long A component of a pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX characters. 84 EHOSTDOWN Host is down A socket operation encountered a defunct host. 85 EHOSTUNREACH No route to host A socket operation was attempted to an unreachable host. 86 ENOTESMPTY Directory not empty A directory with entries other than . and .. was sup- plied to a remove directory or rename call. 87 ENOSTR Device not a stream A stream operation was attempted on a file descriptor that is not a streams device. 88 ENODATA No data (for no delay I/O) Reading from a stream and the O_NEDELAY flag is set (from open(2) or fcntl(2)), but no data is ready to be read. 89 ETIME Stream ioctl timeout The timer set for a streams ioctl(2) system call has expired. The cause of this error is device specific and could indicate either a hardware or software failure, or perhaps a timeout value that is too short for the specific operation. The status of the ioctl(2) operation is indeterminate. 90 ENOSR Out of stream resources During a streams open(2), either no streams queues or no streams-head data structures were available. 95 ESTALE Stale NFS file handle A client referenced an open file after the file was deleted. 96 EREMOTE Too many levels of remote in path An attempt was made to remotely mount a file system into a path that already has a remotely mounted com- ponent. 97 EPROCLIM Too many processes 98 EUSERS Too many users 8 April, 1990



intro(2) intro(2)
100 EDEADLOCK Locking deadlock error This error is returned by locking(2) if deadlock would occur or when the lock table overflows. 101 ENOLCK No locks available If either FLCKREC or FLCKFIL is reached, the lock is not allowed. 102 ENOSYS Funcnot implemented DEFINITIONS System Constants The following are the default implementation-specific con- stants defined in <limits.h> for the A/UX system that is used on the Macintosh II(Reg.): ARG_MAX Maximum length of argument to exec (5120). CHAR_BIT Number of bits in a datum of type char (8). CHAR_MAX Maximum integer value of a char (255). CHILD_MAX Maximum number of processes per user ID (25). INT_MAX Maximum decimal value of an int (2,147,483,647). LINK_MAX Maximum number of links to a single file (1000) LONG_MAX Maximum decimal value of a long (2,147,483,647). MAXDOUBLE Maximum decimal value of a double (1.79769313486231470e+308). NAME_MAX Maximum number of characters in a filename (255). On System V file systems, names are limited to 14 characters. OPEN_MAX Maximum number of files a process can have open (32). PATH_MAX Maximum number of characters in a pathname (1024). PID_MAX Maximum value for a process ID (30,001). PIPE_MAX Maximum number of bytes written to a pipe in a write (5120). PROC_MAX Maximum number of simultaneous system wide April, 1990 9



intro(2) intro(2)
processes (50). SHRT_MAX Maximum decimal value of a short (65,535). SYS_NMLN Number of characters in a string returned by uname (9). UID_MAX Maximum value for a user ID or group ID (60,001). USI_MAX Maximum decimal value of an unsigned (4,294,967,295). INT_MIN Minimum decimal value for an int (-2,147,483,648). LONG_MIN Minimum decimal value for a long (-2,147,483,648). SHRT_MIN Minimum decimal value for a short (-32,768). ULIMIT Maximum number of 512-byte blocks in a file (16,777,216). Process ID Each active process in the system is uniquely identified by a positive integer called a process ID. The range of this ID is from 1 to PID_MAX. Parent Process ID A new process is created by a currently active process (see fork(2)). The parent process ID of a process is the process ID of its creator. Process Group Each active process is a member of a process group that is identified by a positive integer called the process group ID. This ID is the process ID of the group leader. This grouping permits the signaling of related processes (see kill(2)). Tty Group ID Each active process can be a member of a terminal group that is identified by a positive integer called the tty group ID. This grouping is used to terminate a group of related processes upon termination of one of the processes in the group (see exit(2) and signal(3)). Session Each process group is a member of a session. A process is considered to be a member of the session of which its pro- cess group is a member. A newly created process joins the 10 April, 1990



intro(2) intro(2)
session membership (see setsid(3P)). Multiple process groups may be in the same session (see setpgid(3P)). Session Leader A process that has created a session (see setsid(3P)). Controlling Terminal A terminal that is associated with a session. Each session may have at most one controlling terminal associated with it, and a controlling terminal is associated with exactly one session (see termio(7P)). Controlling Process The session leader that established the connection to the controlling terminal. Foreground Process Group Each session that has established a connection with a con- trolling terminal has exactly one process group of the ses- sion as the foreground process group of that controlling terminal. The foreground process group has priveleges, when accessing its controlling terminal, that are denied to back- ground process groups (see termios(7P)). Background Process Group Any process group that is a member of a session that has es- tablished a connection with a controlling terminal that is not in the foreground process group. Real User ID and Real Group ID Each user allowed on the system is identified by a positive integer called a real user ID. Each user is also a member of a group. The group is identi- fied by a positive integer called the real group ID. An active process has a real user ID and real group ID that are set to the real user ID and real group ID, respectively, by the user responsible for the creation of the process. Effective User ID and Effective Group ID An active process has an effective user ID and an effective group ID that are used to determine file-access permissions (described later in this section). The effective user ID and effective group ID are equal to the process's real user ID and real group ID respectively, unless the process or one of its ancestors originated from a file that had the set- user-ID bit or set-group-ID bit set (see exec(2)). Superuser A process is recognized as a ``superuser'' process and is granted special privileges if its effective user ID is 0. April, 1990 11



intro(2) intro(2)
Special Processes The processes with a process ID of 0 and a process ID of 1 are special processes and are referred to as proc0 and proc1. The process proc0 is the scheduler, and proc1 is the ini- tialization process (init). The process proc1 is the ances- tor of every other process in the system and is used to con- trol the process structure. File Descriptor A file descriptor is a small integer used to do I/O on a file. The value of a file descriptor is from 0 to OPEN_MAX-1. A process may not have more than OPEN_MAX file descriptors open simultaneously. A file descriptor is re- turned by system calls such as open(2) or pipe(2). The file descriptor is used as an argument by calls such as read(2), write(2), ioctl(2), and close(2). File Pointer A file with associated stdio buffering is called a stream. A stream is a pointer to a type FILE defined by the <stdio.h> header file: The fopen(3S) routine creates descriptive data for a stream and returns a pointer that identifies the stream in all further transactions with other stdio routines. Most stdio routines manipulate either a stream created by the fopen(3S) function or one of the three streams that are associated with three files that are expected to be open in the base system (see termio(7). These three streams are de- clared in the <stdio.h> header file. stdin the standard input file stdout the standard output file stderr the standard error file Output streams, with the exception of the standard error stream stderr, are, by default, buffered if the output refers to a file and line-buffered if the output refers to a terminal. The standard error output stream stderr is, by default, unbuffered. When an output stream is unbuffered, information is queued for writing on the destination file or terminal as soon as written; when it is buffered, many char- acters are saved up and written as a block. When an output stream is line-buffered, each line of output is queued for writing on the destination terminal as soon as the line is completed, that is, as soon as a newline character is writ- ten or terminal input is requested. The setbuf(3S) routines may be used to change the buffering strategy of the stream. 12 April, 1990



intro(2) intro(2)
Filename Names consisting of 1 to 14 characters may be used to name an ordinary file, special file, or directory. These characters may be selected from the set of all charac- ter values excluding \0 (null) and the ASCII code for / (slash). Note that it is generally unwise to use *, ?, [, or ] as part of filenames because of the special meaning attached to these characters by the shell (see sh(1)). Although permit- ted, it is advisable to avoid the use of unprintable charac- ters in filenames. Pathname and Path Prefix A pathname is a null-terminated character string starting with an optional slash (/), followed by zero or more direc- tory names separated by slashes, then optionally followed by a filename. Unless specifically stated otherwise, the null pathname is treated as if it named a nonexistent file. More precisely, a pathname is a null-terminated character string constructed as follows: <path-name>::=<file>|<path-prefix><file>|/ <path-prefix>::=<rtprefix>|/<rtprefix> <rtprefix>::=<dirname>/|<rtprefix><dirname>/ where <file> is a string of 1 to 14 characters other than the ASCII slash and null, and <dirname> is a string of 1 to 14 characters (other than the ASCII slash and null) that names a directory. If a pathname begins with a slash, the path search begins at the root directory. Otherwise, the search begins from the current working directory. A slash by itself names the root directory. Directory Directory entries are called links. By convention, a direc- tory contains at least two links, . and .., referred to as ``dot'' and ``dot-dot.'' Dot refers to the directory it- self, and dot-dot refers to its parent directory. Root Directory and Current Working Directory Each process has associated with it a root directory and a current working directory for the purpose of resolving path- name searches. The root directory of a process need not be the root directory of the root file system. April, 1990 13



intro(2) intro(2)
File-Access Permissions Read, write, and execute/search permissions on a file are granted to a process if one or more of the following are true: The effective user ID of the process is the superuser. The effective user ID of the process matches the user ID of the owner of the file, the appropriate access bit of the ``owner'' portion (0700) of the file mode is set. The effective user ID of the process does not match the user ID of the owner of the file, the effective group ID of the process matches the group of the file, and the ap- propriate access bit of the ``group'' portion (070) of the file mode is set. The effective user ID of the process does not match the user ID of the owner of the file, the effective group ID of the process does not match the group ID of the file, and the appropriate access bit of the ``other'' portion (07) of the file mode is set. Otherwise, the corresponding permissions are denied. INTERPROCESS COMMUNICATION Message Queue Identifier A message queue identifier (msqid) is a unique positive in- teger created by a msgget(2) system call. Each msqid has a message queue and a data structure associated with it. The data structure is referred to as msqid_ds and contains the following members: struct ipc_perm msg_perm; /* operation permission struct */ ushort msg_qnum; /* number of msgs on q */ ushort msg_qbytes; /* max number of bytes on q */ ushort msg_lspid; /* pid of last msgsnd operation */ ushort msg_lrpid; /* pid of last msgrcv operation */ time_t msg_stime; /* last msgsnd time */ time_t msg_rtime; /* last msgrcv time */ time_t msg_ctime; /* last change time */ /* times measured in secs since 00:00:00 GMT, 1/1/70 */ msg_perm is an ipc_perm structure that specifies the message operation permission (described later). This structure in- cludes the following members: 14 April, 1990



intro(2) intro(2)
ushort cuid; /* creator user ID */ ushort cgid; /* creator group ID */ ushort uid; /* user ID */ ushort gid; /* group ID */ ushort mode; /* r/w permission */ msg_qnum is the number of messages currently on the queue. msg_qbytes is the maximum number of bytes allowed on the queue. msg_lspid is the process ID of the last process that performed a msgsnd operation. msg_lrpid is the process ID of the last process that performed a msgrcv operation. msg_stime is the time of the last msgsnd operation, msg_rtime is the time of the last msgrcv operation, and msg_ctime is the time of the last msgctl(2) operation that changed a member of the msg_perm structure. Semaphore Identifier A semaphore identifier (semid) is a unique positive integer created by a semget(2) system call. Each semid has a set of semaphores and a data structure associated with it. The data structure is referred to as semid_ds and contains the following members: struct ipc_perm sem_perm; /* operation permission struct */ ushort sem_nsems; /* number of sems in set */ time_t sem_otime; /* last operation time */ time_t sem_ctime; /* last change time */ /* times measured in secs since 00:00:00 GMT, 1/1/1970 */ sem_perm is an ipc_perm structure that specifies the sema- phore operation permission (described later in this sec- tion). This structure includes the following members: ushort cuid; /* creator user ID */ ushort cgid; /* creator group ID */ ushort uid; /* user ID */ ushort gid; /* group ID */ ushort mode; /* r/a permission */ The value of sem_nsems is equal to the number of semaphores in the set. Each semaphore in the set is referenced by a positive integer referred to as a sem_num. sem_num values run sequentially from 0 to the value of sem_nsems minus 1. sem_otime is the time of the last semop(2) operation, and sem_ctime is the time of the last semctl(2) operation that changed a member of the structure described earlier. A semaphore is a data structure that contains the following members: April, 1990 15



intro(2) intro(2)
ushort semval; /* semaphore value */ short sempid; /* pid of last operation */ ushort semncnt; /* # awaiting semval > cval */ ushort semzcnt; /* # awaiting semval = 0 */ semval is a non-negative integer. sempid is equal to the process ID of the last process that performed a semaphore operation on this semaphore. semncnt is a count of the number of processes that are currently suspended and await- ing this semaphore's semval to become greater than its current value. semzcnt is a count of the number of processes that are currently suspended awaiting this semaphore's semval to become 0. Shared Memory Identifier A shared memory identifier (shmid) is a unique positive in- teger created by a shmget(2) system call. Each shmid has a segment of memory (referred to as a shared memory segment) and a data structure associated with it. The data structure referred to as shmid_ds contains the following members: struct ipc_perm shm_perm; /* operation permission struct */ int shm_segsz; /* size of segment */ ushort shm_cpid; /* creator pid */ ushort shm_lpid; /* pid of last operation */ short shm_nattch; /* number of current attaches */ time_t shm_atime; /* last attach time */ time_t shm_dtime; /* last detach time */ time_t shm_ctime; /* last change time */ /* Times measured in secs since 00:00:00 GMT, 1/1/70 */ shm_perm is an ipc_perm structure that specifies the shared-memory-operation permission (described later in this section). This structure includes the following members: ushort cuid; /* creator user ID */ ushort cgid; /* creator group ID */ ushort uid; /* user ID */ ushort gid; /* group ID */ ushort mode; /* r/w permission */ shm_segsz specifies the size of the shared memory segment. shm_cpid is the process ID of the process that created the shared memory identifier. shm_lpid is the process ID of the last process that performed a shmop(2) operation. shm_nattch is the number of processes that currently have this segment attached. shm_atime is the time of the last shmat operation, shm_dtime is the time of the last shmdt operation, and shm_ctime is the time of the last shmctl(2) operation that changed one of the members of the structure outlined earlier. 16 April, 1990



intro(2) intro(2)
IPC PERMISSIONS In the msgop(2) and msgctl(2) system-call descriptions, the permission required for an operation is interpreted as fol- lows: 00400 Read by user. 00200 Write by user. 00060 Read/write by group. 00006 Read/write by others. Message Operation Permissions Read and write permissions on a msqid are granted to a pro- cess if one or more of the following are true. The effective user ID of the process is the superuser. The effective user ID of the process matches msg_perm.[c]uid in the data structure associated with msqid, and the appropriate bit of the ``user'' portion (0600) of msg_perm.mode is set. The effective user ID of the process does not match msg_perm.[c]uid, the effective group ID of the process matches msg_perm.[c]gid, and the appropriate bit of the ``group'' portion (060) of msg_perm.mode is set. The effective user ID of the process does not match msg_perm.[c]uid, the effective group ID of the process does not match msg_perm.[c]gid, and the appropriate bit of the ``other'' portion (06) of msg_perm.mode is set. Otherwise, the corresponding permissions are denied. Semaphore Operation Permissions Read and alter permissions on a semid are granted to a pro- cess if one or more of the following are true. The effective user ID of the process is the superuser. The effective user ID of the process matches sem_perm.[c]uid in the data structure associated with semid, and the appropriate bit of the ``user'' portion (0600) of sem_perm.mode is set. The effective user ID of the process does not match sem_perm.[c]uid, the effective group ID of the process matches sem_perm.[c]gid, and the appropriate bit of the ``group'' portion (060) of sem_perm.mode is set. The effective user ID of the process does not match sem_perm.[c]uid, the effective group ID of the process does not match sem_perm.[c]gid, and the appropriate bit April, 1990 17



intro(2) intro(2)
of the ``other'' portion (06) of sem_perm.mode is set. Otherwise, the corresponding permissions are denied. Shared-Memory-Operation Permissions Read and write permissions on a shmid are granted to a pro- cess if one or more of the following are true: The effective user ID of the process is superuser. The effective user ID of the process matches shm_perm.[c]uid in the data structure associated with shmid, and the appropriate bit of the ``user'' portion (0600) of shm_perm.mode is set. The effective user ID of the process does not match shm_perm.[c]uid, the effective group ID of the process matches shm_perm.[c]gid, and the appropriate bit of the ``group'' portion (060) of shm_perm.mode is set. The effective user ID of the process does not match shm_perm.[c]uid, the effective group ID of the process does not match shm_perm.[c]gid, and the appropriate bit of the ``other'' portion (06) of shm_perm.mode is set. Otherwise, the corresponding permissions are denied. SEE ALSO close(2), ioctl(2), open(2), pipe(2), read(2), write(2), in- tro(3), perror(3). ``Overview of the A/UX Programming Environment'' in A/UX Programming Languages and Tools, Volume 1. 18 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026