Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro(2) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

close(2)

ioctl(2)

open(2)

pipe(2)

read(2)

write(2)

intro(3)

intro(2)

NAME

intro, errno − introduction to system calls and error numbers

SYNTAX

#include <errno.h>

DESCRIPTION

Section 2 describes the ULTRIX-11 system calls, that is, the entries into the ULTRIX-11 kernel.  Most system calls are identified by the section number (2) at the top of the page.  However, some system calls also have a section number modifier:

(2j) These system calls, together with the subroutines described in section (3j), provide C shell job control.  For further information, intro(3j). 

(2v) These system calls provide SYSTEM V compatibility.  For further information about the SYSTEM V programming environment, see cc(1). 

System Manual
Calls Description Page
accept Accept connection on socket accept(2)
access Determine file accessibility access(2)
acct Turn accounting on/off acct(2)
alarm Schedule signal after specified time alarm(2)
bind Bind name to socket bind(2)
break Change core allocation brk(2)
brk Change core allocation brk(2)
chdir Change default directory chdir(2)
chmod Change file mode chmod(2)
chown Change file owner chown(2)
chroot Change root directory chroot(2)
close Close file close(2)
connect Initiate connection on socket connect(2)
creat Create new file creat(2)
dup Duplicate open file descriptor dup(2)
dup2 Duplicate open file descriptor dup(2)
errno Introduction to error numbers intro(2)
exec Execute file exec(2)
exece Execute file exec(2)
execl Execute file exec(2)
execle Execute file exec(2)
execlp Execute file exec(2)
execv Execute file exec(2)
execvp Execute file exec(2)
execve Execute file exec(2)
exit Terminate process exit(2)
fcntl File control fcntl(2)
fork Spawn new process fork(2)
fperr Get floating point error status fperr(2)
fpsim Floating point simulation fpsim(2)
fstat Get file status stat(2)
ftime Get date and time time(2)
getegid Get user and group IDs getuid(2)
geteuid Get user and group IDs getuid(2)
getgid Get user and group IDs getuid(2)
gethostid Get current host ID gethostid(2)
gethostname Get current host name gethostname(2)
getpeername Get connected peer name getpeername(2)
getpgrp Get process group setpgrp(2j)
getpgrp Get process group (SYSTEM V) setpgrp(2v)
getpid Get process ID getpid(2)
getppid Get process ID getpid(2)
getsockname Get socket name getsockname(2)
getsockopt Get socket options getsockopt(2)
getuid Get user and group ID getuid(2)
gtty Control device ioctl(2)
indir Indirect system call indir(2)
ioctl Control I/O device ioctl(2)
kill Send signal to process kill(2)
killpg Send signal to process or process group killpg(2j)
link Link to file link(2)
listen Listen for connections on socket listen(2)
lock Lock process in primary memory lock(2)
lseek Move read/write pointer lseek(2)
lstat Get file status stat(2)
maus Multiple-access user-space maus(2)
mknod Make directory or special file mknod(2)
mount Mount or remove file system mount(2)
msgctl Message control operations msgctl(2)
msgget Get message queue msgget(2)
msgop Message operations msgop(2)
nice Set program priority nice(2)
nostk Allow process to manage its stack nostk(2)
open Open for reading or writing open(2)
pause Stop until signal pause(2)
phys Allow process to access physical addresses phys(2)
pipe Create interprocess channel pipe(2)
plock Lock process, text, or data in memory plock(2)
profil Profile execution time profil(2)
ptrace Process trace ptrace(2)
read Read from file read(2)
readlink Read value of symbolic link readlink(2)
recv Receive message from socket recv(2)
recvfrom Receive message from socket recv(2)
recvmsg Receive message from socket recv(2)
renice Set program priority renice(2)
sbrk Change core allocation brk(2)
select Synchronous I/O multiplexing select(2)
semctl Semaphore control semctl(2)
semget Get set of semaphores semget(2)
semop Semaphore operations semop(2)
send Send message from socket send(2)
sendmsg Send message from socket send(2)
sendto Send message from socket send(2)
setgid Set user and group ID setuid(2)
sethostid Set current host ID gethostid(2)
sethostname Set current host name gethostname(2)
setpgrp Set process group setpgrp(2j)
setpgrp Set process group (SYSTEM V) setpgrp(2v)
setregid Set real and effective gid setregid(2)
setreuid Set real and effective uid setreuid(2)
setsockopt Set socket options getsockopt(2)
setuid Set user and group ID setuid(2)
shutdown Shut down part of full-duplex connection shutdown(2)
signal Catch or ignore signals signal(2)
sigsys Catch or ignore signals sigsys(2j)
socket Create communication endpoint socket(2)
socketpair Create pair of connected sockets socketpair(2)
stat Get file status stat(2)
stime Set time stime(2)
stty Control tty device ioctl(2)
symlink Make symbolic link symlink(2)
sync Update super block sync(2)
tell Move read/write pointer lseek(2)
time Get date and time time(2)
times Get process times times(2)
ulimit Get and set user limits ulimit(2)
umask Set file creation mode mask umask(2)
umount Remove file system mount(2)
uname Get current UNIX system name uname(2)
unlink Remove directory entry unlink(2)
ustat Get file system statistics ustat(2)
utime Set file times utime(2)
wait Wait for process to terminate wait(2)
wait2 Wait for process to terminate wait2(2j)
write Write on file write(2)
zaptty Zap controlling tty zaptty(2)

RETURN VALUE

Most of the system calls return a value to indicate if the call was successful or unsuccessful.  Unless otherwise specified, they return a 0 if successful and a -1 if unsuccessful. 

When unsuccessful, most system calls additionally return an error number in the global variable errno to indicate the error condition encountered.  The errno value is not cleared on successful calls, so it should be tested only after an error has occurred.  There is a table of messages associated with each error number and a routine for printing the appropriate message.  For further information, see perror(3). 

The following lists each error number, its corresponding name and message, and a brief description of the possible cause(s). 

0    Error 0
This error number is unused.

1  EPERM  Not owner
Typically, this error indicates an attempt to modify a file in some way that is forbidden, except to its owner or superuser. It also is returned when ordinary users attempt to do things permitted only to the superuser.

2  ENOENT  No such file or directory
This error occurs either when a file which should exist but doesn’t is specified, or when one of the directories in the specified path does not exist.

3  ESRCH  No such process
The process whose number was given to signal and ptrace calls either does not exist or is already dead. 

4  EINTR  Interrupted system call
During a system call, an asynchronous signal which the user elected to catch occurred (for example, an interrupt or quit). If, after processing the signal, execution is resumed, it will appear as if the interrupted system call returned this error condition.

5  EIO  I/O error
During a read or write, a physical I/O error occurred. In some cases, this error can occur on a subsequent call than the one to which it actually applies.

6  ENXIO  No such device or address
I/O on a special file refers either to a subdevice that does not exist or is beyond the limits of the device. This error can also occur when a tape drive is not dialed in or a disk pack is not loaded on a drive.

7  E2BIG  Arg list too long
An argument list longer than 5120 bytes is presented to the exec call. 

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. For further information, see a.out(5).

9  EBADF  Bad file number
Either a file descriptor refers to no open file, a read request is made to a file that is open only for writing, or a write request is made to a file that is open only for reading.

10  ECHILD  No children
During a wait call, the process has no living or unwaited-for children. 

11  EAGAIN  No more processes
During a fork call, either the system’s process table becomes full, or the user is not allowed to create any more processes. 

12  ENOMEM  Not enough core
During an exec or break call, a program asks for more core than the system is able to supply.  This is not a temporary condition.  The maximum core size is a system parameter.  The error can also occur if the arrangement of text, data, and stack segments requires too many segmentation registers. 

13  EACCES  Permission denied
An attempt was made to access a file in a way forbidden by the file’s mode (permissions).

14  EFAULT  Bad address
The system encountered a hardware fault while attempting to access the arguments of a system call.

15  ENOTBLK  Block device required
A data file was specified where a block device is required (for example, while attempting a mount call). 

16  EBUSY  Mount device busy
An attempt was made either to mount a device that was already mounted or to dismount a device on which there is an active file (that is, an open file, current directory, mounted-on file, active text segment).

17  EEXIST  File exists
An existing file was mentioned in an inappropriate context, for example, while attempting a link call. 

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, read a write-only device).

20  ENOTDIR  Not a directory
A non-directory was specified where a directory is required (for example, in a path name or as an argument to the chdir call. 

21  EISDIR  Is a directory
An attempt was made to write on a directory.

22  EINVAL  Invalid argument
An invalid argument was specified (for example, dismounting a non-mounted device, mentioning an unknown signal during a signal call, reading or writing a file for which a seek call has generated a negative pointer.  This error can also occur with math library subroutines.  For further information, see intro(3). 

23  ENFILE  File table overflow
The system’s table of open files is full, and no open calls can be temporarily accepted. 

24  EMFILE  Too many open files
The configuration limit is 20 per process.

25  ENOTTY  Not a typewriter
The file argument for a stty or gtty call either is not a terminal or is not one of the devices to which these calls apply. 

26  ETXTBSY  Text file busy
An attempt either to execute a pure procedure program currently open for writing/reading or to open for writing/reading a pure procedure program currently being executed.

27  EFBIG  File too large
The size of a file exceeded the maximum (about 109 bytes). 

28  ENOSPC  No space left on device
During a write call to an ordinary file, there is no free space left on the device. 

29  ESPIPE  Illegal seek
An lseek call was issued to a pipe.  This error can also be issued for other non-seekable 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 to make more than 32767 links to a file.

32  EPIPE  Broken pipe
A write on a pipe for which there is no process to read the data. This condition normally generates a signal. If the signal is ignored, the error is returned.

33  EDOM  Math argument
The argument to a math library subroutine (3m) is out of the domain of the function.

34  ERANGE  Result too large
The value of the math library subroutine (3m) is not representable within machine precision.

35  ETPL  Fatal error - tape position lost
A tape driver has encountered a tape error that has caused it to loose track of tape position.

36  ETOL  Tape unit off-line
An attempt has been made to access a tape drive that is not available, that is, either no tape loaded or off-line.

37  ETWL  Tape unit write locked
A write was attempted on a tape without a write enable ring installed.

38  ETO  Tape unit already open
An attempt was made to access a tape drive that either is already in use or is hung for some reason.

39  EDESTADDRREQ  Destination address required
A required address was omitted from an operation on a socket.

40  EMSGSIZE  Message too long
A message sent on a socket was larger than the internal message buffer.

41  EPROTOTYPE  Protocol wrong type for socket
A protocol was specified which does not support the semantics of the socket type requested. For example, you cannot use the ARPA Internet UDP protocol with type SOCK_STREAM.

42  ENOPROTOOPT  Bad protocol option
A bad option was specified to a getsockopt or setsockopt call. 

43  EPROTONOSUPPORT  Protocol not supported
Either the protocol has not been configured into the system, or no implementation for it exists.

44  ESOCKTNOSUPPORT  Socket type not supported
Either support for the socket type has not been configured into the system, or no implementation for it exists.

45  EOPNOTSUPP  Operation not supported on socket
For example, attempting an accept call for a connection on a datagram socket will cause this error. 

46  EPFNOSUPPORT  Protocol family not supported
Either the protocol family has not been configured into the system, or no implementation for it exists.

47  EAFNOSUPPORT  Address family not supported by protocol family
An address incompatible with the requested protocol was used. For example, you should not necessarily expect to be able to use PUP Internet addresses with ARPA Internet protocols.

48  EADDRINUSE  Address already in use
Normally, only one usage of each address is permitted.

49  EADDRNOTAVAIL  Can’t assign requested address
Normally, this error results from an attempt to create a socket with an address not on this machine.

50  ENETDOWN  Network is down
A socket operation encountered a dead network.

51  ENETUNREACH  Network is unreachable
A socket operation was attempted to an unreachable network.

52  ENETRESET  Network dropped connection on reset
The host you were connected to crashed and rebooted.

53  ECONNABORTED  Software caused connection abort
Something internal to your host machine caused a connection abort.

54  ECONNRESET  Connection reset by peer
A connection was forcibly closed by a peer. Normally, this results from the peer executing a shutdown call. 

55  ENOBUFS  No buffer space available
The system lacked sufficient buffer space to perform an operation on a socket or pipe.

56  EISCONN  Socket is already connected
Either a connect call was made on an already connected socket, or a sendto or sendmsg call was made on a connected socket which specified a destination other than the connected party. 

57  ENOTCONN  Socket is not connected
An request to send or receive data was not allowed because the socket is not connected.

58  ESHUTDOWN  Can’t send after socket shutdown
A request to send data was not allowed because the socket had already been shut down with a previous shutdown call. 

59  ETOOMANYREFS  Too many references: can’t splice

60  ETIMEDOUT  Connection timed out
A connect call failed because the connected party did not properly respond after a period of time.  (The timeout period is dependent on the communication protocol.) 

61  ECONNREFUSED  Connection refused
No connection could be made because the target machine actively refused it. Usually, this results from trying to connect to a service which is inactive on the foreign host.

62  ELOOP  Too many levels of symbolic links
A path name lookup involved more than 8 symbolic links.

63  ENAMETOOLONG  File name too long
Either a component of a path name exceeded 255 characters, or an entire path name exceeded 1023 characters.

64  EHOSTDOWN  Host is down

65  EHOSTUNREACH  No route to host

66  ENOTEMPTY  Directory not empty
A directory with entries other than “.” and “..” was supplied to a remove directory or rename call.

67  EPROCLIM  Too many processes

68  EUSERS  Too many users

69  EDQUOT  Disc quota exceeded

70  EWOULDBLOCK  Operation would block
An operation which would cause a process to block was attempted on a object in non-blocking mode. For further information, see ioctl(2).

71  EINPROGRESS  Operation now in progress
An operation which takes a long time to complete (for example, a connect call) was attempted on a non-blocking object.  For further information, see ioctl(2). 

72  EALREADY  Operation already in progress
An operation was attempted on a non-blocking object which already had an operation in progress.

73  ENOTSOCK  Socket operation on non-socket

74  ENOMSG  No message of desired type
The queue does not contain a message of the desired type and ( msgtyp & IPC_NOWAIT ) is true. 

75  EIDRM  Identifier removed
The error is returned to processes that resume execution because an identifier from the file system’s name space was removed.

76  ECHRNG  Channel number out of range

77  EL2NSYNC  Level 2 not synchronized

78  EL3HLT  Level 3 halted

79  EL3RST  Level 3 reset

80  ELNRNG  Link number out of range

81  EUNATCH  Proto

82  ENOCSI  No CSI structure available

83  EL2HLT  Level 2 halted

84  EDEADLK  Deadlock condition avoided
The request would have caused a deadlock, but the condition was detected and avoided.

85  ENOLCK  No locks available
There are no more locks available: the system lock table is full.

86  EBADFS  Bad file system superblock
Superblock consistency checks performed by the mount system call failed.  A mount was attempted on a device with a corrupted superblock or no file system on the device. 

DEFINITIONS

Process ID

Each active process in the system is uniquely identified by a positive integer called a process ID.  This ID is from 1 to 30,000. 

Parent Process ID

A new process is created by a currently active process.  For further information, see fork(2).  The parent process ID of a process is the process ID of its creator. 

Process Group ID

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.  For further information, 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.  For further information, see exit(2) and signal(2). 

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 identified 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, of 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.  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 evolved from a file that had the set-user-ID bit or set-group ID bit set.  For further information, see exec(2). 

Superuser

A process is recognized as a superuser process and is granted special privileges if its effective user ID is 0. 

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 scheduler is “proc0”.  The system initialization process (init) is “proc1”, which is the ancestor of every other process in the system and is used to control the process structure. 

File Descriptor

A file descriptor is a small integer (0-19) that is used to do I/O on a file.  A process may have no more than 20 file descriptors (0-19) open simultaneously.  A file descriptor is returned by system calls (for example, the open or pipe calls).  The file descriptor then is used as an argument by other system calls (for example, the read, write, ioctl, and close calls). 

File Name

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 character values excluding \0 (null) and the ASCII code for / (slash).  It is generally unwise to use * , ? , [ , or ] as part of file names because of the special meaning attached to these characters by the shell.  For further information, see csh(1) and sh(1).  Although permitted, it also is advisable to avoid the use of unprintable characters in file names. 

Path Name and Path Prefix

A path name is a null-terminated character string starting with an optional slash (/), followed by zero or more directory names separated by slashes, and optionally followed by a file name. 

If a path name begins with a slash, the path search begins with the root directory of the system.  If a path name does not begin with a slash, the search begins with the current working directory.  A slash by itself names the root directory of the system, and a null path name refers to the current working directory. 

Directory

A directory contains a number of entries, called links.  Each directory entry provides the initial mapping information for (references to) another file in the file system.  By convention, each directory contains a minimum of two links: “.” and “..” (referred to as “dot” and “dot-dot”, respectively).  These links merely refer to the directory itself and to its parent directory. 

Root Directory and Current Working Directory

For the purpose of resolving path name searches, each process has associated with it a concept of a root directory and a current working directory.  The root directory of a process need not be the root directory of the system (/).

File Access Permissions

Every file in the file system has a set of access permissions (mode).  The system uses these permission in determining whether a process may perform a read, write, or execute operation on that file.  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 superuser. 

•The effective user ID of the process matches the user ID of the owner of the file, and 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, but the effective group ID of the process matches the group of the file, and the appropriate access bit of the group portion (070) of the file mode is set. 

•Neither the effective user ID of the process matches the user ID of the owner of the file, nor the effective group ID of the process matches the group ID of the file, but the appropriate access bit of the other portion (007) of the file mode is set. 

Sockets and Address Families

A socket is an endpoint for communication between processes.  Each socket has a separate queue for sending and receiving data.  Each socket is typed according to its communications properties: whether messages sent or received require the name of the partner, whether communication is reliable, what format is used in naming message recipients, and so on.  For further information about supported socket types, see socket(2).  Each instance of the system supports some number of communications protocol sets.  Each of these protocol sets supports addresses of a certain format.  An Address Family is the set of addresses for a specific group of protocols.  Each socket has an address chosen from the address family in which the socket was created. 

Message Queue Identifier

A message queue identifier (msqid) is a unique positive integer created by a msgget 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:

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, Jan. 1, 1970 ∗/

The msg_perm is an ipc_perm structure that specifies the message operation permission (see below).  This structure includes:

ushort  cuid;       /∗ creator user id ∗/
ushort  cgid;       /∗ creator group id ∗/
ushort  uid;        /∗ user id ∗/
ushort  gid;        /∗ group id ∗/
ushort  mode;       /∗ r/w permission ∗/

The msg_qnum is the number of messages currently on the queue.  The msg_qbytes is the maximum number of bytes allowed on the queue.  The msg_lspid is the process ID of the last process that performed a msgsnd call.  The msg_lrpid is the process id of the last process that performed a msgrcv call.  The msg_stime is the time of the last msgsnd call, msg_rtime is the time of the last msgrcv call, and msg_ctime is the time of the last msgctl call that changed a member of the above structure. 

Message Operation Permissions

In the msgop and msgctl system call, the permission required for an operation is given as “{token}”, where “token” is the type of permission needed and is interpreted as:

00400   Read by user
00200   Write by user
00040   Read by group
00020   Write by group
00004   Read by others
00002   Write by others

Read and Write permissions on a msqid are granted to a process if:

•The effective user ID of the process is 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, but 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. 

•Neither the effective user ID of the process matches msg_perm.[c]uid, nor the effective group ID of the process matches msg_perm.[c]gid, but the appropriate bit of the other portion (006) of msg_perm.mode is set. 

Semaphore Identifier

A semaphore identifier (semid) is a unique positive integer created by a semget 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:

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, Jan. 1, 1970 ∗/

The sem_perm is an ipc_perm structure that specifies the semaphore operation permission (see below).  This structure includes:

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.  The sem_num values run sequentially from 0 to the value of sem_nsems minus 1.  The sem_otime is the time of the last semop call, and sem_ctime is the time of the last semctl call that changed a member of the above structure.  A semaphore is a data structure that contains:

ushort  semval;     /∗ semaphore value ∗/
short   sempid;     /∗ pid of last operation  ∗/
ushort  semncnt;    /∗ # awaiting semval > cval ∗/
ushort  semzcnt;    /∗ # awaiting semval = 0 ∗/

The semval is a non-negative integer.  The sempid is equal to the process ID of the last process that performed a semaphore operation on this semaphore.  The semncnt is a count of the number of processes that are currently suspended awaiting this semaphore’s semval to become greater than its current value.  The semzcnt is a count of the number of processes that are currently suspended awaiting this semaphore’s semval to become zero. 

Semaphore Operation Permissions

In the semop and semctl system calls, the permission required for an operation is given as “{token}”, where “token” is the type of permission needed interpreted as follows:

00400   Read by user
00200   Alter by user
00040   Read by group
00020   Alter by group
00004   Read by others
00002   Alter by others

Read and Alter permissions on a semid are granted to a process 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 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, but 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. 

•Neither the effective user ID of the process matches sem_perm.[c]uid, nor the effective group ID of the process matches sem_perm.[c]gid, but the appropriate bit of the other portion (006) of sem_perm.mode is set. 

SEE ALSO

close(2), ioctl(2), open(2), pipe(2), read(2), write(2), intro(3). 

RESTRICTIONS

The getfp, bdflush, errlog, and ttlocl system calls are intentionally not documented.  These calls are reserved for use by ULTRIX-11 system programs and must not be called by any user process. 

ASSEMBLER

as /usr/include/sys.s file ... 

The PDP11 assembly language interface is given for each system call.  The assembler symbols are defined in /usr/include/sys.s. 

Return values appear in registers r0 and r1.  It is unwise to count on these registers being preserved when no value is expected.  An erroneous call is always indicated by turning on the C-bit of the condition codes.  The error number is returned in r0.  The presence of an error is most easily tested by the instructions bes and bec (’branch on error set (or clear)’).  These are synonyms for the bcs and bcc instructions. 

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