NAME | DESCRIPTION | DEFINITIONS | ATTRIBUTES | SEE ALSO
This section describes the POSIX 1003.1 and 1003.1b compliant system calls within the ChorusOS API.
Each API function is associated with one or more system features. A given interface is available if, and only if, one of its associated features was configured in the target system when that system was built. See intro(2K) for a complete list of the features that make up the ChorusOS API.
System calls in this section follow POSIX 1003.1/1003.1b conventions for error conditions. If an error occurs, all calls return -1 and set the errno variable to indicate the specific error. POSIX error codes are listed in the file <errno.h>. For more detailed information on error returns, see intro(2K).
Each user allowed on the system is identified by a positive integer called a user ID (uid).
Each user is also member of one or more groups. One of these groups is distinguished from the others, and the positive integer corresponding to it is called the user's group ID. Positive integers corresponding to other groups are called supplementary group IDs.
If its user ID is 0, an actor is recognized as a super-user actor and is granted special privileges with regard to file operations.
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. This is a tunable configuration variable. An actor may have no more than OPEN_MAX file descriptors (0 - OPEN_MAX-1) open simultaneously. A file descriptor is returned by system calls such as open(2POSIX), socket(2POSIX), or shm_open(2POSIX). The file descriptor is used as an argument by calls such as read(2POSIX), write(2POSIX), ioctl(2POSIX), and close(2POSIX).
Names consisting of 1 to NAME_MAX characters may be used to identify an ordinary file, special file or directory.
These characters may be selected from the set of all character values excluding \:0 (null) and / (slash).
Note that it is generally unwise to use *, ?, [, or ] as part of file names because of the specific meanings attached to these characters by UNIX shells. Although permitted, it is advisable to avoid the use of unprintable characters in file names.
A path name is a null-terminated character string starting with an optional slash (/), followed by zero or more directory names separated by slashes, optionally followed by a file name.
If a path name 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.
Unless specifically stated otherwise, a null path name is treated as if it named a non-existent file.
A posix object name is a null-terminated character string. Names consisting of 1 to _SC_MQ_PATHMAX or _SC_SHM_PATHMAX characters may be used to identify a message queue or a shared memory object.
Posix object names define a global name space.
Directories organize files into a hierarchical system where the directories are the nodes in the hierarchy. A directory is a file that catalogues the list of files, including sub-directories, that are directly below it in the hierarchy. Entries in a directory file are called links. A link associates a file indentifier with a file name. By convention, a directory contains at least two links, . and .., referred to as dot and dot-dot, respectively. The link called dot refers to the directory itself, while dot-dot refers to its parent directory. The root directory, which is the top-most node of the hierarchy, has itself as its parent directory. The path name of the root directory is / and the parent directory of the root directory is /.
When booted, each site is assigned a default root directory. Depending on the system configuration, this directory may be a directory of a local file system or a directory accessed through NFS. By default, each actor created on a site will have its own root directory set to the default root directory of the site.
Each actor has the concept of a root directory and a current working directory associated with it, for the purpose of resolving path name searches. The root directory of an actor does not have to be the default site root directory.
Read, write, and execute/search permissions on a file are granted to an actor if one or more of the following are true:
The actor is a super-user actor.
The user ID of the actor 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 user ID of the actor does not match the user ID of the owner of the file, and either the group ID of the actor matches the group ID of the file, or the group ID of the file is in the supplementary group IDs, and the appropriate access bit of the ``group'' portion (070) of the file mode is set.
Neither the user ID nor group ID and supplementary group IDs of the actor match the corresponding user ID and group ID of the file, but the appropriate access bit of the ``other'' portion (07) of the file mode is set.
Otherwise, the corresponding permissions are denied.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | DESCRIPTION | DEFINITIONS | ATTRIBUTES | SEE ALSO