Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/./man2/Intro.2
Real path: /usr/share/man/man2/Intro.2
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Portions Copyright (c) 1986, 2023, Oracle and/or its affiliates. .TH Intro 2 "30 Jan 2023" "Oracle Solaris 11.4" "System Calls" .SH NAME Intro, intro \- introduction to system calls and error numbers .SH SYNOPSIS .LP .nf \fB#include <errno.h>\fR .fi .SH DESCRIPTION .sp .LP A system call is a C library function that requests a service from the system, such as getting the time of day. This request is performed in the kernel. The library interface executes a trap into the kernel, which actually executes the system call code. .sp .LP Most system calls return one or more error conditions. An error condition is indicated by an otherwise impossible return value. This is almost always \fB\(mi1\fR or the null pointer; the individual descriptions specify the details. An error number is made available in the external variable \fBerrno\fR, which is not cleared on successful calls, so it should be tested only after an error has been indicated. .sp .LP Every thread has a unique \fBerrno\fR value specific to that thread. The \fBerrno\fR variable is implemented as a macro that references this per-thread value. This \fBerrno\fR macro can be used on either side of the assignment as though it were a variable. Prior to the Oracle Solaris 11.4 release, it was necessary to specify the \fB-mt\fR option on the command line at compilation time to enable the per-thread implementation of \fBerrno\fR. The \fB-mt\fR option is no longer required when compiling on Solaris 11.4.0 or later. .sp .LP An error value listed as "will fail" describes a condition whose detection and reporting is mandatory. An application can rely on this condition being detected and reported. An error value listed as "may fail" describes a condition whose detection and reporting is optional. An application should not rely on this condition being detected and reported. An application that relies on such behavior cannot be assured to be portable. If more than one error occurs in processing a function call, any one of the possible errors may be returned, as the order of detection is undefined. .sp .LP Most Solaris system calls conform to Version 4 of the Single UNIX Specification (\fBSUSv4\fR), but Solaris also provides a number of extensions beyond what the standard defines. For more information regarding the Single UNIX Specification, see the \fBstandards\fR(7) man page. .sp .LP Each system call description attempts to list all possible error numbers that apply to that call. The following list gives the description of the error numbers and their names as defined in \fB<errno.h>\fR. .sp .ne 2 .mk .na \fB1 EPERM\fR .ad .RS 23n .rt Insufficient privileges .sp This error indicates an attempt to perform an operation requiring either a permission that the current process does not have on the target object or a privilege not in the effective set of the process making the call. See "File Access Permissions" below, and \fBprivileges\fR(7). .sp The manual pages for individual functions document which privileges are needed to override the restriction. .RE .sp .ne 2 .mk .na \fB2 ENOENT\fR .ad .RS 23n .rt No such file or directory .sp This error occurs when a file name is specified but the file doesn't exist, or one of the directories in the path name does not exist. .RE .sp .ne 2 .mk .na \fB3 ESRCH\fR .ad .RS 23n .rt No such process .sp This error occurs when no process or thread can be found in the system that corresponds to the specified \fBPID\fR, \fBLWPID_t\fR, or \fBthread_t\fR. .RE .sp .ne 2 .mk .na \fB4 EINTR\fR .ad .RS 23n .rt Interrupted system call .sp This error occurs when an asynchronous signal (such as interrupt or quit), which the user has elected to catch, occurred during a system service function. If execution is resumed after processing the signal, it will appear as if the interrupted function call returned this error condition. .sp In a multithreaded application, \fBEINTR\fR may be returned whenever another thread or \fBLWP\fR calls \fBfork\fR(2). .RE .sp .ne 2 .mk .na \fB5 EIO\fR .ad .RS 23n .rt I/O error .sp Some physical I/O error has occurred. In some cases, this error may occur on a call following the one to which it actually applies. .RE .sp .ne 2 .mk .na \fB6 ENXIO\fR .ad .RS 23n .rt No such device or address .sp This error occurs when I/O on a special file refers to a subdevice which does not exist, or exists beyond the limit of the device. It may also occur when, for example, a tape drive is not on-line or no media is loaded in a removable media drive. .RE .sp .ne 2 .mk .na \fB7 E2BIG\fR .ad .RS 23n .rt Arg list too long .sp This error occurs when an argument list longer than \fBARG_MAX\fR bytes is presented to a member of the \fBexec\fR family of functions (see \fBexec\fR(2)). The argument list limit is the sum of the size of the argument list plus the size of the environment's exported shell variables. .RE .sp .ne 2 .mk .na \fB8 ENOEXEC\fR .ad .RS 23n .rt Exec format error .sp This error occurs when a request is made to execute a file which, although it has the appropriate permissions, does not start with a valid format (see \fBa.out\fR(5)). .RE .sp .ne 2 .mk .na \fB9 EBADF\fR .ad .RS 23n .rt Bad file number .sp This error occurs when either a file descriptor refers to no open file, or a \fBread\fR(2) (respectively, \fBwrite\fR(2)) request is made to a file that is open only for writing (respectively, reading). .RE .sp .ne 2 .mk .na \fB10 ECHILD\fR .ad .RS 23n .rt No child processes .sp This error occurs when a \fBwait\fR(3C) function call is executed by a process that has no existing or unwaited-for child processes. .RE .sp .ne 2 .mk .na \fB11 EAGAIN\fR .ad .RS 23n .rt Resource temporarily unavailable .sp This error occurs when no more of a given resource, such as processes, LWPs, or memory, is available, but may become available later when other processes exit or otherwise reduce their usage of the resource. For example, the \fBfork\fR(2) function failed because the system's process table is full or the user is not allowed to create any more processes, or a call failed because of insufficient memory or swap space. .RE .sp .ne 2 .mk .na \fB12 ENOMEM\fR .ad .RS 23n .rt Cannot allocate memory .sp This error occurs when a program asks for more memory than the system is able to supply. This is not a temporary condition; the maximum size is a system parameter. On some architectures, 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 the \fBfork\fR(2) function. .RE .sp .ne 2 .mk .na \fB13 EACCES\fR .ad .RS 23n .rt Permission denied .sp This error occurs when an attempt is made to access a file in a way forbidden by the protection system. .sp The manual pages for individual functions document the privileges that are needed to override the protection system. .RE .sp .ne 2 .mk .na \fB14 EFAULT\fR .ad .RS 23n .rt Bad address .sp This error occurs when the system encounters a hardware fault in attempting to use an argument of a routine. For example, \fBerrno\fR potentially may be set to \fBEFAULT\fR any time a routine that takes a pointer argument is passed an invalid address, if the system can detect the condition. Since systems differ in their ability to reliably detect a bad address, on some implementations passing a bad address to a routine will result in undefined behavior. Examples of a bad address include but are not limited to an address not mapped into the user's address space or an address with an incorrect ADI version. For more information, see the \fBadi\fR(3C) man page. .RE .sp .ne 2 .mk .na \fB15 ENOTBLK\fR .ad .RS 23n .rt Block device required .sp This error occurs when a non-block device or file is mentioned where a block device is required (for example, in a call to the \fBmount\fR(2) function). .RE .sp .ne 2 .mk .na \fB16 EBUSY\fR .ad .RS 23n .rt Device busy .sp This error occurs when an attempt is made to mount a device that is already mounted or an attempt is made to unmount a device on which there is an active file (open file, current directory, mounted-on file, active text segment). It will also occur if an attempt is made to enable accounting when it is already enabled. The device or resource is currently unavailable. \fBEBUSY\fR is also used by mutexes, semaphores, condition variables, and r/w locks, to indicate that a lock is held, and by the processor control function \fBP_ONLINE\fR. .RE .sp .ne 2 .mk .na \fB17 EEXIST\fR .ad .RS 23n .rt File exists .sp This error occurs when an existing file is mentioned in an inappropriate context (for example, call to the \fBlink\fR(2) function). .RE .sp .ne 2 .mk .na \fB18 EXDEV\fR .ad .RS 23n .rt Cross-device link .sp This error occurs when a hard link to a file on another filesystem is attempted. .RE .sp .ne 2 .mk .na \fB19 ENODEV\fR .ad .RS 23n .rt No such device .sp This error occurs when an attempt is made to apply an inappropriate operation to a device (for example, read a write-only device). .RE .sp .ne 2 .mk .na \fB20 ENOTDIR\fR .ad .RS 23n .rt Not a directory .sp This error occurs when a non-directory is specified where a directory is required (for example, in a path prefix or as an argument to the \fBchdir\fR(2) function). .RE .sp .ne 2 .mk .na \fB21 EISDIR\fR .ad .RS 23n .rt Is a directory .sp This error occurs when an attempt is made to write on a directory. .RE .sp .ne 2 .mk .na \fB22 EINVAL\fR .ad .RS 23n .rt Invalid argument .sp This error occurs when an invalid argument is specified (for example, unmounting a non-mounted device), mentioning an undefined signal in a call to the \fBsignal\fR(3C) or \fBkill\fR(2) function, or an unsupported operation related to extended attributes is attempted. .RE .sp .ne 2 .mk .na \fB23 ENFILE\fR .ad .RS 23n .rt File table overflow .sp This error occurs when the system file table is full (that is, \fBSYS_OPEN\fR files are open, and temporarily no more files can be opened). .RE .sp .ne 2 .mk .na \fB24 EMFILE\fR .ad .RS 23n .rt Too many open files .sp This error occurs when a process attempts to have more than {\fBOPEN_MAX\fR} file descriptors open at a time. See the \fBFile Descriptor\fR subsection of the \fBDEFINITIONS\fR section below. .RE .sp .ne 2 .mk .na \fB25 ENOTTY\fR .ad .RS 23n .rt Inappropriate ioctl for device .sp This error occurs when a call was made to the \fBioctl\fR(2) function with a request that is not valid for the given file descriptor, such as specifying a file that is not a special character device, or specifying a request that is not supported for the given device type. .RE .sp .ne 2 .mk .na \fB26 ETXTBSY\fR .ad .RS 23n .rt Text file busy (obsolete) .sp This error occurs when an attempt is made to execute a pure-procedure program that is currently open for writing. Also an attempt to open for writing or to remove a pure-procedure program that is being executed. \fB(This message is obsolete.)\fR .RE .sp .ne 2 .mk .na \fB27 EFBIG\fR .ad .RS 23n .rt File too large .sp This error occurs when the size of the file exceeds the limit specified by resource \fBRLIMIT_FSIZE\fR; the file size exceeds the maximum supported by the file system; or the file size exceeds the offset maximum of the file descriptor. See the \fBFile Descriptor\fR subsection of the \fBDEFINITIONS\fR section below. .RE .sp .ne 2 .mk .na \fB28 ENOSPC\fR .ad .RS 23n .rt No space left on device .sp This error occurs while creating a directory entry or writing an ordinary file, there is no free space left on the device. In the \fBfcntl\fR(2) function, the setting or removing of record locks on a file cannot be accomplished because there are no more record entries left on the system. .RE .sp .ne 2 .mk .na \fB29 ESPIPE\fR .ad .RS 23n .rt Illegal seek .sp This error occurs when a call to the \fBlseek\fR(2) function is issued to a pipe. .RE .sp .ne 2 .mk .na \fB30 EROFS\fR .ad .RS 23n .rt Read-only file system .sp This error occurs when an attempt to modify a file or directory is made on a device mounted read-only. .RE .sp .ne 2 .mk .na \fB31 EMLINK\fR .ad .RS 23n .rt Too many links .sp This error occurs an attempt to make more than the maximum number of links, \fBLINK_MAX\fR, to a file. .RE .sp .ne 2 .mk .na \fB32 EPIPE\fR .ad .RS 23n .rt Broken pipe .sp This error occurs when a write on a pipe for which there is no process to read the data. This condition normally generates a signal; the error is returned if the signal is ignored. .RE .sp .ne 2 .mk .na \fB33 EDOM\fR .ad .RS 23n .rt Argument out of domain .sp This error occurs when the argument of a function in the math package (3M) is out of the domain of the function. .RE .sp .ne 2 .mk .na \fB34 ERANGE\fR .ad .RS 23n .rt Result too large .sp This error occurs when the value of a function in the math package (3M) is not representable within machine precision. .RE .sp .ne 2 .mk .na \fB35 ENOMSG\fR .ad .RS 23n .rt No message of desired type .sp This error occurs when an attempt is made to receive a message of a type that does not exist on the specified message queue (see \fBmsgrcv\fR(2)). .RE .sp .ne 2 .mk .na \fB36 EIDRM\fR .ad .RS 23n .rt Identifier removed .sp This error is returned to processes that resume execution due to the removal of an identifier from the file system's name space (see \fBmsgctl\fR(2), \fBsemctl\fR(2), and \fBshmctl\fR(2)). .RE .sp .ne 2 .mk .na \fB37 ECHRNG\fR .ad .RS 23n .rt Channel number out of range .RE .sp .ne 2 .mk .na \fB38 EL2NSYNC\fR .ad .RS 23n .rt Level 2 not synchronized .RE .sp .ne 2 .mk .na \fB39 EL3HLT\fR .ad .RS 23n .rt Level 3 halted .RE .sp .ne 2 .mk .na \fB40 EL3RST\fR .ad .RS 23n .rt Level 3 reset .RE .sp .ne 2 .mk .na \fB41 ELNRNG\fR .ad .RS 23n .rt Link number out of range .RE .sp .ne 2 .mk .na \fB42 EUNATCH\fR .ad .RS 23n .rt Protocol driver not attached .RE .sp .ne 2 .mk .na \fB43 ENOCSI\fR .ad .RS 23n .rt No CSI structure available .RE .sp .ne 2 .mk .na \fB44 EL2HLT\fR .ad .RS 23n .rt Level 2 halted .RE .sp .ne 2 .mk .na \fB45 EDEADLK\fR .ad .RS 23n .rt Deadlock situation detected/avoided .sp This error occurs when a deadlock situation is detected and avoided. This error pertains to file and record locking, and also applies to mutexes, semaphores, condition variables, and r/w locks. .RE .sp .ne 2 .mk .na \fB46 ENOLCK\fR .ad .RS 23n .rt No record locks available .sp This error occurs when there are no more locks available. The system lock table is full (see \fBfcntl\fR(2)). .RE .sp .ne 2 .mk .na \fB47 ECANCELED\fR .ad .RS 23n .rt Operation canceled .sp This error occurs when the associated asynchronous operation is canceled before completion. .RE .sp .ne 2 .mk .na \fB48 ENOTSUP\fR .ad .RS 23n .rt Operation not supported .sp This error occurs when this version of the system does not support the feature. Other versions of the system may provide support. .RE .sp .ne 2 .mk .na \fB49 EDQUOT\fR .ad .RS 23n .rt Disc quota exceeded .sp A \fBwrite\fR(2) to an ordinary file, the creation of a directory or symbolic link, or the creation of a directory entry failed because the user's quota of disk blocks was exhausted, or the allocation of an inode for a newly created file failed because the user's quota of inodes was exhausted. .RE .sp .ne 2 .mk .na \fB50 ECKSUM\fR .ad .RS 23n .rt Checksum failure .RE .sp .ne 2 .mk .na \fB51 EFRAGS\fR .ad .RS 23n .rt Too fragmented .RE .sp .ne 2 .mk .na \fB52 EXFULL\fR .ad .RS 23n .rt Message tables full .RE .sp .ne 2 .mk .na \fB53 ENOKEY\fR .ad .RS 23n .rt Cryptographic key not available .RE .sp .ne 2 .mk .na \fB58 EOWNERDEAD\fR .ad .RS 23n .rt Owner of the lock died .sp An attempt to acquire a robust mutex succeeded, but the state protected by the mutex may be inconsistent as the prior owner terminated without unlocking it. See \fBmutex_init\fR(3C) for further information. .RE .sp .ne 2 .mk .na \fB59 ENOTRECOVERABLE\fR .ad .RS 23n .rt Lock is not recoverable .sp An attempt to acquire a robust mutex failed as a previous owner terminated without unlocking it, and the prior owner was unable to make the state it protects be consistent again. See \fBmutex_init\fR(3C) for further information. .RE .sp .ne 2 .mk .na \fB60 ENOSTR\fR .ad .RS 23n .rt Not a stream device .sp A \fBputmsg\fR(2) or \fBgetmsg\fR(2) call was attempted on a file descriptor that is not a STREAMS device. .RE .sp .ne 2 .mk .na \fB61 ENODATA\fR .ad .RS 23n .rt No data available .RE .sp .ne 2 .mk .na \fB62 ETIME\fR .ad .RS 23n .rt Timer expired .sp This error occurs when the timer set for a STREAMS \fBioctl\fR(2) 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 \fBioctl()\fR operation is indeterminate. This is also returned in the case of \fB_lwp_cond_timedwait\fR(2) or \fBcond_timedwait\fR(3C). .RE .sp .ne 2 .mk .na \fB63 ENOSR\fR .ad .RS 23n .rt Out of stream resources .sp During a \fBSTREAMS\fR \fBopen\fR(2) call, either no \fBSTREAMS\fR queues or no \fBSTREAMS\fR head data structures were available. This is a temporary condition; one may recover from it if other processes release resources. .RE .sp .ne 2 .mk .na \fB64 ENONET\fR .ad .RS 23n .rt Machine is not on the network .RE .sp .ne 2 .mk .na \fB65 ENOPKG\fR .ad .RS 23n .rt Package not installed .sp This error occurs when users attempt to use a call from a package which has not been installed. .RE .sp .ne 2 .mk .na \fB66 EREMOTE\fR .ad .RS 23n .rt Object is remote .sp This error occurs when users try to share a resource that is not on the local machine, or try to \fBmount\fR(2) or \fBumount\fR(2) a device or path name that is on a remote machine. .RE .sp .ne 2 .mk .na \fB67 ENOLINK\fR .ad .RS 23n .rt Link has been severed .sp An operation on a file failed because the file is on a remote machine and the link to that machine is no longer active. .RE .sp .ne 2 .mk .na \fB68 EADV\fR .ad .RS 23n .rt Advertise error (obsolete) .sp This error is RFS (Remote File System) specific. It occurs when users try to advertise a resource already advertised, try to stop RFS while there are resources still advertised, or try to forceably unmount a resource that is still advertised. .RE .sp .ne 2 .mk .na \fB69 ESRMNT\fR .ad .RS 23n .rt Srmount error (obsolete) .sp This error is RFS (Remote File System) specific. It occurs when an attempt is made to stop RFS while resources are still mounted by remote machines, or when a resource is readvertised with a client list that does not include a remote machine with the resource currently mounted. .RE .sp .ne 2 .mk .na \fB70 ECOMM\fR .ad .RS 23n .rt Communication error on send .sp An operation on a file failed because the file is on a remote machine and the link to that machine is no longer active. .RE .sp .ne 2 .mk .na \fB71 EPROTO\fR .ad .RS 23n .rt Protocol error .sp This error occurs when some protocol error occurs. This error is device-specific, but is generally not related to a hardware failure. .RE .sp .ne 2 .mk .na \fB72 ELOCKUNMAPPED\fR .ad .RS 23n .rt Locked lock was unmapped (obsolete) .sp An obsolete error message, since replaced by \fBEOWNERDEAD\fR. See \fBmutex_init\fR(3C) for further information. .RE .sp .ne 2 .mk .na \fB73 ENOTACTIVE\fR .ad .RS 23n .rt Facility is not active .sp A system call failed because it required a facillity, such as Extended Accounting, that was not active. .RE .sp .ne 2 .mk .na \fB74 EMULTIHOP\fR .ad .RS 23n .rt Multihop attempted .sp A call failed because components of a file path require hopping to multiple remote machines and the file system does not allow it. .RE .sp .ne 2 .mk .na \fB75 EADI\fR .ad .RS 23n .rt Application Data Integrity mismatch detected .sp This error occurs when an \fBADI\fR version mismatch is detected when the system attempts to read or write data to an ADI-enabled location that is part of a buffer used for I/O. See \fBadi\fR(7). .RE .sp .ne 2 .mk .na \fB77 EBADMSG\fR .ad .RS 23n .rt Not a data message .sp During a \fBread\fR(2), \fBgetmsg\fR(2), or \fBioctl\fR(2) \fBI_RECVFD\fR call to a STREAMS device, something has come to the head of the queue that cannot be processed. That something depends on the call: .sp .ne 2 .mk .na \fB\fBread()\fR:\fR .ad .RS 11n .rt control information or passed file descriptor. .RE .sp .ne 2 .mk .na \fB\fBgetmsg()\fR:\fR .ad .RS 11n .rt passed file descriptor. .RE .sp .ne 2 .mk .na \fB\fBioctl()\fR:\fR .ad .RS 11n .rt control or data information. .RE .RE .sp .ne 2 .mk .na \fB78 ENAMETOOLONG\fR .ad .RS 23n .rt File name too long .sp This error occurs when the length of the path argument exceeds \fIPATH_MAX\fR, or the length of a path component exceeds \fINAME_MAX\fR while \fB_POSIX_NO_TRUNC\fR is in effect; see \fBlimits.h\fR(3HEAD). .RE .sp .ne 2 .mk .na \fB79 EOVERFLOW\fR .ad .RS 23n .rt Value too large for defined data type .sp This error occurs when a value is outside of the range defined for the data type it is to be stored in. .RE .sp .ne 2 .mk .na \fB80 ENOTUNIQ\fR .ad .RS 23n .rt Name not unique on network .sp This error occurs when a given log name is not unique. .RE .sp .ne 2 .mk .na \fB81 EBADFD\fR .ad .RS 23n .rt File descriptor in bad state .sp This error occurs when either a file descriptor refers to no open file or a read request is made to a file that is open only for writing. .RE .sp .ne 2 .mk .na \fB82 EREMCHG\fR .ad .RS 23n .rt Remote address changed .RE .sp .ne 2 .mk .na \fB83 ELIBACC\fR .ad .RS 23n .rt Cannot access a needed shared library (obsolete) .sp Trying to \fBexec\fR an \fBa.out\fR that requires a static shared library and the static shared library does not exist or the user does not have permission to use it. .RE .sp .ne 2 .mk .na \fB84 ELIBBAD\fR .ad .RS 23n .rt Accessing a corrupted shared library (obsolete) .sp Trying to \fBexec\fR an \fBa.out\fR that requires a static shared library (to be linked in) and \fBexec\fR could not load the static shared library. The static shared library is probably corrupted. .RE .sp .ne 2 .mk .na \fB85 ELIBSCN\fR .ad .RS 23n .rt \fB.lib\fR section in \fBa.out\fR corrupted (obsolete) .sp Trying to \fBexec\fR an \fBa.out\fR that requires a static shared library (to be linked in) and there was erroneous data in the \fB.lib\fR section of the \fBa.out\fR. The \fB.lib\fR section tells \fBexec\fR what static shared libraries are needed. The \fBa.out\fR is probably corrupted. .RE .sp .ne 2 .mk .na \fB86 ELIBMAX\fR .ad .RS 23n .rt Attempting to link in more shared libraries than system limit (obsolete) .sp Trying to \fBexec\fR an \fBa.out\fR that requires more static shared libraries than is allowed on the current configuration of the system. .RE .sp .ne 2 .mk .na \fB87 ELIBEXEC\fR .ad .RS 23n .rt Cannot \fBexec\fR a shared library directly (obsolete) .sp This error occurs while attempting to \fBexec\fR a shared library directly. .RE .sp .ne 2 .mk .na \fB88 EILSEQ\fR .ad .RS 23n .rt Illegal byte sequence .sp This error occurs if there is a byte sequence that is not valid for the expected character encoding. .RE .sp .ne 2 .mk .na \fB89 ENOSYS\fR .ad .RS 23n .rt Operation not applicable .RE .sp .ne 2 .mk .na \fB90 ELOOP\fR .ad .RS 23n .rt Number of symbolic links encountered during path name traversal exceeds \fBMAXSYMLINKS\fR .RE .sp .ne 2 .mk .na \fB91 ERESTART\fR .ad .RS 23n .rt Restartable system call .sp This error occurs when an interrupted system call should be restarted (not externally visible). .RE .sp .ne 2 .mk .na \fB92 ESTRPIPE\fR .ad .RS 23n .rt If pipe/FIFO, don't sleep in stream head .sp Streams pipe error (not externally visible). .RE .sp .ne 2 .mk .na \fB93 ENOTEMPTY\fR .ad .RS 23n .rt Directory not empty .RE .sp .ne 2 .mk .na \fB94 EUSERS\fR .ad .RS 23n .rt Too many users .RE .sp .ne 2 .mk .na \fB95 ENOTSOCK\fR .ad .RS 23n .rt Socket operation on non-socket .RE .sp .ne 2 .mk .na \fB96 EDESTADDRREQ\fR .ad .RS 23n .rt Destination address required .sp This error occurs when a required address is omitted from an operation on a transport endpoint. Destination address is required. .RE .sp .ne 2 .mk .na \fB97 EMSGSIZE\fR .ad .RS 23n .rt Message too long .sp This error occurs when a message sent on a transport provider is larger than the internal message buffer or some other network limit. .RE .sp .ne 2 .mk .na \fB98 EPROTOTYPE\fR .ad .RS 23n .rt Protocol wrong type for socket .sp This error occurs when a protocol specified does not support the semantics of the socket type requested. .RE .sp .ne 2 .mk .na \fB99 ENOPROTOOPT\fR .ad .RS 23n .rt Option not supported by protocol .sp This error occurs when a bad option or level is specified when getting or setting options for a protocol. .RE .sp .ne 2 .mk .na \fB120 EPROTONOSUPPORT\fR .ad .RS 23n .rt Protocol not supported .sp The protocol has not been configured into the system or no implementation for it exists. .RE .sp .ne 2 .mk .na \fB121 ESOCKTNOSUPPORT\fR .ad .RS 23n .rt Socket type not supported .sp The support for the socket type has not been configured into the system or no implementation for it exists. .RE .sp .ne 2 .mk .na \fB122 EOPNOTSUPP\fR .ad .RS 23n .rt Operation not supported on transport endpoint .sp For example, trying to accept a connection on a datagram transport endpoint. .RE .sp .ne 2 .mk .na \fB123 EPFNOSUPPORT\fR .ad .RS 23n .rt Protocol family not supported .sp The protocol family has not been configured into the system or no implementation for it exists. Used for the Internet protocols. .RE .sp .ne 2 .mk .na \fB124 EAFNOSUPPORT\fR .ad .RS 23n .rt Address family not supported by protocol family .sp This error occurs when an address incompatible with the requested protocol is used. .RE .sp .ne 2 .mk .na \fB125 EADDRINUSE\fR .ad .RS 23n .rt Address already in use .sp This error occurs when a user attempts to use an address already in use, and the protocol does not allow this. .RE .sp .ne 2 .mk .na \fB126 EADDRNOTAVAIL\fR .ad .RS 23n .rt Cannot assign requested address .sp Results from an attempt to create a transport endpoint with an address not on the current machine. .RE .sp .ne 2 .mk .na \fB127 ENETDOWN\fR .ad .RS 23n .rt Network is down .sp Operation encountered a dead network. .RE .sp .ne 2 .mk .na \fB128 ENETUNREACH\fR .ad .RS 23n .rt Network is unreachable .sp Operation was attempted to an unreachable network. .RE .sp .ne 2 .mk .na \fB129 ENETRESET\fR .ad .RS 23n .rt Network dropped connection because of reset .sp This error occurs when the host you are connected to crashes and reboots. .RE .sp .ne 2 .mk .na \fB130 ECONNABORTED\fR .ad .RS 23n .rt Software caused connection abort .sp A connection abort was caused internal to your host machine. .RE .sp .ne 2 .mk .na \fB131 ECONNRESET\fR .ad .RS 23n .rt Connection reset by peer .sp A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote host due to a timeout or a reboot. .RE .sp .ne 2 .mk .na \fB132 ENOBUFS\fR .ad .RS 23n .rt No buffer space available .sp This error occurs when an operation on a transport endpoint or pipe is not performed because the system lacked sufficient buffer space or because a queue is full. .RE .sp .ne 2 .mk .na \fB133 EISCONN\fR .ad .RS 23n .rt Transport endpoint is already connected .sp This error occurs when a connect request is made on an already connected transport endpoint; or, a \fBsendto()\fR or \fBsendmsg()\fR request on a connected transport endpoint specified a destination when already connected. .RE .sp .ne 2 .mk .na \fB134 ENOTCONN\fR .ad .RS 23n .rt Transport endpoint is not connected .sp This error occurs when a request to send or receive data is disallowed because the transport endpoint is not connected and (when sending a datagram) no address was supplied. .RE .sp .ne 2 .mk .na \fB143 ESHUTDOWN\fR .ad .RS 23n .rt Cannot send after socket shutdown .sp This error occurs when a request to send data is disallowed because the transport endpoint has already been shut down. .RE .sp .ne 2 .mk .na \fB144 ETOOMANYREFS\fR .ad .RS 23n .rt Too many references: cannot splice .RE .sp .ne 2 .mk .na \fB145 ETIMEDOUT\fR .ad .RS 23n .rt Connection timed out .sp This error occurs when a \fBconnect\fR or \fBsend\fR request fails because the connected party does not properly responds after a period of time; or a \fBwrite\fR or \fBfsync\fR request fails because a file is on an \fBNFS\fR file system mounted with the \fIsoft\fR option. .RE .sp .ne 2 .mk .na \fB146 ECONNREFUSED\fR .ad .RS 23n .rt Connection refused .sp This error occurs when 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 remote host. .RE .sp .ne 2 .mk .na \fB147 EHOSTDOWN\fR .ad .RS 23n .rt Host is down .sp This error occurs when a transport provider operation fails because the destination host is down. .RE .sp .ne 2 .mk .na \fB148 EHOSTUNREACH\fR .ad .RS 23n .rt No route to host .sp This error occurs when a transport provider operation is attempted to an unreachable host. .RE .sp .ne 2 .mk .na \fB149 EALREADY\fR .ad .RS 23n .rt Operation already in progress .sp This error occurs when an operation is attempted on a non-blocking object that already has an operation in progress. .RE .sp .ne 2 .mk .na \fB150 EINPROGRESS\fR .ad .RS 23n .rt Operation now in progress .sp This error occurs when an operation that takes a long time to complete (such as a \fBconnect()\fR) is attempted on a non-blocking object. .RE .sp .ne 2 .mk .na \fB151 ESTALE\fR .ad .RS 23n .rt Stale NFS file handle .sp A file or directory that was opened by an NFS client was either removed or replaced on the server. .RE .SH DEFINITIONS .SS "Background Process Group" .sp .LP Any process group that is not the foreground process group of a session that has established a connection with a controlling terminal. .SS "Controlling Process" .sp .LP A session leader that established a connection to a controlling terminal. .SS "Controlling Terminal" .sp .LP A terminal that is associated with a session. Each session may have, at most, one controlling terminal associated with it and a controlling terminal may be associated with only one session. Certain input sequences from the controlling terminal cause signals to be sent to process groups in the session associated with the controlling terminal. For more information, see the \fBtermio\fR(4I) man page. .SS "Directory" .sp .LP Directories organize files into a hierarchical system where directories are the nodes in the hierarchy. A directory is a file that catalogs the list of files, including directories (sub-directories), that are directly beneath it in the hierarchy. Entries in a directory file are called links. A link associates a file identifier with a filename. By convention, a directory contains at least two links, \fB.\fR (dot) and \fB..\fR (dot-dot). 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 pathname of the root directory is \fB/\fR and the parent directory of the root directory is \fB/\fR. .SS "Downstream" .sp .LP The direction from the stream head to the driver in a stream. .SS "Driver" .sp .LP A driver provides the software interface to peripheral hardware. A driver can also be a pseudo-driver, such as a multiplexor or log driver (see \fBlog\fR(4D)), which is not associated with a hardware device. .SS "Effective User ID and Effective Group ID" .sp .LP An active process has an effective user \fBID\fR and an effective group \fBID\fR that are used to determine file access permissions (see below). The effective user \fBID\fR and effective group \fBID\fR are equal to the process's real user \fBID\fR and real group \fBID\fR, 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 (see \fBexec\fR(2)). .SS "File Access Permissions" .sp .LP Read, write, and execute/search permissions for a file are granted to a process if one or more of the following conditions are true: .RS +4 .TP .ie t \(bu .el o 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. .RE .RS +4 .TP .ie t \(bu .el o The effective user ID of the process does not match the user ID of the owner of the file, but either the effective group ID or one of the supplementary group IDs of the process match the group ID of the file and the appropriate access bit of the "group" portion (0070) of the file mode is set. .RE .RS +4 .TP .ie t \(bu .el o The effective user ID of the process does not match the user ID of the owner of the file, and neither the effective group ID nor any of the supplementary group IDs of the process match the group ID of the file, but the appropriate access bit of the "other" portion (0007) of the file mode is set. .RE .RS +4 .TP .ie t \(bu .el o The read, write, or execute mode bit is not set but the process has the discretionary file access override privilege for the corresponding mode bit: {\fBPRIV_FILE_DAC_READ\fR} for the read bit, {\fBPRIV_FILE_DAC_WRITE\fR} for the write bit, {\fBPRIV_FILE_DAC_SEARCH\fR} for the execute bit on directories, and {\fBPRIV_FILE_DAC_EXECUTE\fR} for the executable bit on plain files. .RE .RS +4 .TP .ie t \(bu .el o The file has an Access Control List (\fBACL\fR) with an entry granting permission to the user or group of the process. See \fBacl\fR(7) for details. .RE .sp .LP Otherwise, the corresponding permissions are denied. .sp .LP Note that processes that have permission to write to a file may be blocked from doing so if certain system attributes are set on the file. See the \fBsysattr\fR(7) manual page for details. .SS "File Descriptor" .sp .LP A file descriptor is a small integer used to perform \fBI/O\fR operations on a file. The value of a file descriptor is from \fB0\fR to ({\fBOPEN_MAX} \(mi 1\fR). A process may have no more than {\fBOPEN_MAX\fR} file descriptors open simultaneously. On Oracle Solaris, the value of {\fBOPEN_MAX\fR} is controlled by the \fBRLIMIT_NOFILE\fR resource limit or the \fBprocess.max-file-descriptor\fR resource control. See the \fBgetrlimit\fR(2) and \fBresource-controls\fR(7) man pages, and \fIGeneral I/O Parameters\fR in \fIOracle Solaris 11.4 Tunable Parameters Reference Manual\fR. .sp .LP A file descriptor is returned by calls such as \fBopen\fR(2) or \fBpipe\fR(2). The file descriptor is used as an argument by calls such as \fBread\fR(2), \fBwrite\fR(2), \fBioctl\fR(2), and \fBclose\fR(2). .sp .LP The values \fB0\fR, \fB1\fR, and \fB2\fR have special meaning and conventional uses, and are referred to as \fIstandard input\fR (\fBstdin\fR), \fIstandard output\fR (\fBstdout\fR), and \fIstandard error\fR (\fBstderr\fR), respectively. Programs usually take their input from standard input, and write output on standard output. Diagnostic messages are usually written on standard error. The \fB<unistd.h>\fR header defines constants \fBSTDIN_FILENO\fR, \fBSTDOUT_FILENO\fR, and \fBSTDERR_FILENO\fR corresponding to these file descriptor values. .sp .LP Each file descriptor has a corresponding offset maximum. For regular files that are opened by a 32-bit process without setting the \fBO_LARGEFILE\fR flag, the offset maximum is 2 Gbyte \(mi 1 byte (2^31 \(mi1 bytes). For regular files that are opened by a 32-bit process with the \fBO_LARGEFILE\fR flag set, or which are opened by a 64-bit process, the offset maximum is 2^63 \(mi1 bytes. .SS "File Name" .sp .LP Names consisting of 1 to \fINAME_MAX\fR characters are used to name an ordinary file, special file or directory. .sp .LP These characters are selected from the set of all character values excluding \e0 (null) and the \fBASCII\fR code for \fB/\fR (slash). .sp .LP Note that it is generally unwise to use \fB*\fR, \fB?\fR, \fB[\fR, or \fB]\fR as part of file names because of the special meaning attached to these characters by the shell (see \fBsh\fR(1), \fBcsh\fR(1), and \fBksh\fR(1)). Although permitted, the use of unprintable characters in file names should be avoided. .sp .LP A file name is sometimes referred to as a pathname component. The interpretation of a pathname component is dependent on the values of \fINAME_MAX\fR and \fB_POSIX_NO_TRUNC\fR associated with the path prefix of that component. If any pathname component longer than \fINAME_MAX\fR and \fB_POSIX_NO_TRUNC\fR is in effect for the path prefix of that component (see \fBfpathconf\fR(2) and \fBlimits.h\fR(3HEAD)), it shall be considered an error condition in that implementation. Otherwise, the implementation shall use the first \fINAME_MAX\fR bytes of the pathname component. .SS "Foreground Process Group" .sp .LP Each session that has established a connection with a controlling terminal will distinguish one process group of the session as the foreground process group of the controlling terminal. This group has certain privileges when accessing its controlling terminal that are denied to background process groups. .SS "{IOV_MAX}" .sp .LP Maximum number of entries in a \fBstruct iovec\fR array. .SS "{LIMIT}" .sp .LP The braces notation, \fB{LIMIT}\fR, is used to denote a magnitude limitation imposed by the implementation. This indicates a value which may be defined by a header file (without the braces), or the actual value may be obtained at runtime by a call to the configuration inquiry \fBpathconf\fR(2) with the name argument \fB_PC_LIMIT\fR. .SS "Masks" .sp .LP The file mode creation mask of the process used during any create function calls to turn off permission bits in the \fImode\fR argument supplied. Bit positions that are set in \fBumask(\fR\fIcmask\fR\fB)\fR are cleared in the mode of the created file. .SS "Message" .sp .LP In a stream, one or more blocks of data or information, with associated STREAMS control structures. Messages can be of several defined types, which identify the message contents. Messages are the only means of transferring data and communicating within a stream. .SS "Message Queue" .sp .LP In a stream, a linked list of messages awaiting processing by a module or driver. .SS "Message Queue Identifier" .sp .LP A message queue identifier (\fBmsqid\fR) is a unique positive integer created by a \fBmsgget\fR(2) call. Each \fBmsqid\fR has a message queue and a data structure associated with it. The data structure is referred to as \fBmsqid_ds\fR and contains the following members: .sp .in +2 .nf struct ipc_perm msg_perm; struct msg *msg_first; struct msg *msg_last; ulong_t msg_cbytes; ulong_t msg_qnum; ulong_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; time_t msg_stime; time_t msg_rtime; time_t msg_ctime; .fi .in -2 .sp .sp .LP The following information describes the \fBmsqid_ds\fR structure members: .sp .LP The \fBmsg_perm\fR member is an \fBipc_perm\fR structure that specifies the message operation permission (see below). This structure includes the following members: .sp .in +2 .nf uid_t cuid; /* creator user id */ gid_t cgid; /* creator group id */ uid_t uid; /* user id */ gid_t gid; /* group id */ mode_t mode; /* r/w permission */ ulong_t seq; /* slot usage sequence # */ key_t key; /* key */ .fi .in -2 .sp .sp .LP The \fB*msg_first\fR member is a pointer to the first message on the queue. .sp .LP The \fB*msg_last\fR member is a pointer to the last message on the queue. .sp .LP The \fBmsg_cbytes\fR member is the current number of bytes on the queue. .sp .LP The \fBmsg_qnum\fR member is the number of messages currently on the queue. .sp .LP The \fBmsg_qbytes\fR member is the maximum number of bytes allowed on the queue. .sp .LP The \fBmsg_lspid\fR member is the process \fBID\fR of the last process that performed a \fBmsgsnd()\fR operation. .sp .LP The \fBmsg_lrpid\fR member is the process id of the last process that performed a \fBmsgrcv()\fR operation. .sp .LP The \fBmsg_stime\fR member is the time of the last \fBmsgsnd()\fR operation. .sp .LP The \fBmsg_rtime\fR member is the time of the last \fBmsgrcv()\fR operation. .sp .LP The \fBmsg_ctime\fR member is the time of the last \fBmsgctl()\fR operation that changed a member of the above structure. .SS "Message Operation Permissions" .sp .LP In the \fBmsgctl\fR(2), \fBmsgget\fR(2), \fBmsgrcv\fR(2), and \fBmsgsnd\fR(2) function descriptions, the permission required for an operation is given as {\fItoken\fR}, where \fItoken\fR is the type of permission needed, interpreted as follows: .sp .in +2 .nf 00400 READ by user 00200 WRITE by user 00040 READ by group 00020 WRITE by group 00004 READ by others 00002 WRITE by others .fi .in -2 .sp .sp .LP Read and write permissions for a \fBmsqid\fR are granted to a process if one or more of the following conditions are true: .RS +4 .TP .ie t \(bu .el o The {\fBPRIV_IPC_DAC_READ\fR} or {\fBPRIV_IPC_DAC_WRITE\fR} privilege is present in the effective set. .RE .RS +4 .TP .ie t \(bu .el o The effective user \fBID\fR of the process matches \fBmsg_perm.cuid\fR or \fBmsg_perm.uid\fR in the data structure associated with \fBmsqid\fR and the appropriate bit of the "user" portion (0600) of \fBmsg_perm.mode\fR is set. .RE .RS +4 .TP .ie t \(bu .el o Any group ID in the process credentials from the set matches \fBmsg_perm.cgid\fR or \fBmsg_perm.gid\fR and the appropriate bit of the "group" portion (060) of \fBmsg_perm.mode\fR is set. .RE .RS +4 .TP .ie t \(bu .el o The appropriate bit of the "other" portion (006) of \fBmsg_perm.mode\fR is set." .RE .sp .LP Otherwise, the corresponding permissions are denied. .SS "Module" .sp .LP A module is an entity containing processing routines for input and output data. It always exists in the middle of a stream, between the stream's head and a driver. A module is the STREAMS counterpart to the commands in a shell pipeline except that a module contains a pair of functions which allow independent bidirectional (downstream and upstream) data flow and processing. .SS "Multiplexor" .sp .LP A multiplexor is a driver that allows streams associated with several user processes to be connected to a single driver, or several drivers to be connected to a single user process. STREAMS does not provide a general multiplexing driver, but does provide the facilities for constructing them and for connecting multiplexed configurations of streams. .SS "Offset Maximum" .sp .LP An offset maximum is an attribute of an open file description representing the largest value that can be used as a file offset. .SS "Orphaned Process Group" .sp .LP A process group in which the parent of every member in the group is either itself a member of the group, or is not a member of the process group's session. .SS "Parent Process \fBID\fR" .sp .LP A new process is created by a currently active process (see \fBfork\fR(2)). The parent process \fBID\fR of a process is the process \fBID\fR of its creator. .SS "Path Name" .sp .LP A path name is a null-terminated character string starting with an optional slash (\fB/\fR), followed by zero or more directory names separated by slashes, optionally followed by a file name. .sp .LP 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. .sp .LP A slash by itself names the root directory. .sp .LP Unless specifically stated otherwise, the null path name is treated as if it named a non-existent file. .SS "Privilege" .sp .LP Having appropriate privileges means having the capability to override system restrictions. On Solaris, these are represented as sets of privileges that provide fine-grained control over the actions a process can take. Specific privileges are denoted in man pages as {\fBPRIV_NAME\fR}, and are listed and defined in the \fBprivileges\fR(7) man page. When referenced in source code, the braces are not included. .SS "Privileged User" .sp .LP Solaris software implements a set of privileges that provide fine-grained control over the actions of processes. The possession of a certain privilege allows a process to perform a specific set of restricted operations. Prior to the Oracle Solaris 10 release, a process running with uid 0 was granted all privileges. See \fBprivileges\fR(7) for the semantics and the degree of backward compatibility awarded to processes with an effective uid of 0. .SS "Process Group" .sp .LP Each process in the system is a member of a process group that is identified by a process group ID. Any process that is not a process group leader may create a new process group and become its leader. Any process that is not a process group leader may join an existing process group that shares the same session as the process. A newly created process joins the process group of its parent. .SS "Process Group Leader" .sp .LP A process group leader is a process whose process \fBID\fR is the same as its process group ID. .SS "Process Group \fBID\fR" .sp .LP Each active process is a member of a process group and is identified by a positive integer called the process group ID. This \fBID\fR is the process \fBID\fR of the group leader. This grouping permits the signaling of related processes (for more information, see \fBkill\fR(2) man page). .SS "Process \fBID\fR" .sp .LP Each process in the system is uniquely identified during its lifetime by a positive integer called a process ID. A process ID cannot be reused by the system until the process lifetime, process group lifetime, and session lifetime ends for any process ID, process group ID, and session ID equal to that process ID. There are threads within a process with thread IDs \fBthread_t\fR and \fBLWPID_t\fR. These threads are not visible to the outside process. .SS "Process Lifetime" .sp .LP A process lifetime begins when the process is forked and ends after it exits, when its termination has been acknowledged by its parent process. For more information, see \fBwait\fR(3C) man page. .SS "Process Group Lifetime" .sp .LP A process group lifetime begins when the process group is created by its process group leader, and ends when the lifetime of the last process in the group ends or when the last process in the group leaves the group. .SS "Processor Set \fBID\fR" .sp .LP The processors in a system may be divided into subsets, known as processor sets. A process bound to one of these sets will run only on processors in that set, and the processors in the set will normally run only processes that have been bound to the set. Each active processor set is identified by a positive integer. For more information, see \fBpset_create\fR(2) man page. .SS "Read Queue" .sp .LP In a stream, the message queue in a module or driver containing messages moving upstream. .SS "Real User \fBID\fR and Real Group \fBID\fR" .sp .LP Each user allowed on the system is identified by a positive integer (\fB0\fR to \fBMAXUID\fR) called a real user \fBID\fR. .sp .LP Each user is also a member of a group. The group is identified by a positive integer called the real group \fBID\fR. .sp .LP An active process has a real user \fBID\fR and real group \fBID\fR that are set to the real user \fBID\fR and real group \fBID\fR, respectively, of the user responsible for the creation of the process. .SS "Root Directory and Current Working Directory" .sp .LP Each process has associated with it a concept of 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. .SS "Saved Resource Limits" .sp .LP Saved resource limits is an attribute of a process that provides some flexibility in the handling of unrepresentable resource limits, as described in the \fBexec\fR family of functions and \fBsetrlimit\fR(2). .SS "Saved User \fBID\fR and Saved Group \fBID\fR" .sp .LP The saved user \fBID\fR and saved group \fBID\fR are the values of the effective user \fBID\fR and effective group \fBID\fR just after an \fBexec\fR of a file whose set user or set group file mode bit has been set (see \fBexec\fR(2)). .SS "Semaphore Identifier" .sp .LP A semaphore identifier (\fBsemid\fR) is a unique positive integer created by a \fBsemget\fR(2) call. Each \fBsemid\fR has a set of semaphores and a data structure associated with it. The data structure is referred to as \fBsemid_ds\fR and contains the following members: .sp .in +2 .nf struct ipc_perm sem_perm; /* operation permission struct */ struct sem *sem_base; /* ptr to first semaphore in set */ ushort_t 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 */ .fi .in -2 .sp .sp .LP The following are descriptions of the \fBsemid_ds\fR structure members: .sp .LP The \fBsem_perm\fR member is an \fBipc_perm\fR structure that specifies the semaphore operation permission (see below). This structure includes the following members: .sp .in +2 .nf uid_t uid; /* user id */ gid_t gid; /* group id */ uid_t cuid; /* creator user id */ gid_t cgid; /* creator group id */ mode_t mode; /* r/a permission */ ulong_t seq; /* slot usage sequence number */ key_t key; /* key */ .fi .in -2 .sp .sp .LP The \fBsem_nsems\fR member is equal to the number of semaphores in the set. Each semaphore in the set is referenced by a nonnegative integer referred to as a \fBsem_num\fR. \fBsem_num\fR values run sequentially from \fB0\fR to the value of \fBsem_nsems\fR minus 1. .sp .LP The \fBsem_otime\fR member is the time of the last \fBsemop\fR(2) operation. .sp .LP The \fBsem_ctime\fR member is the time of the last \fBsemctl\fR(2) operation that changed a member of the above structure. .sp .LP A semaphore is a data structure called \fBsem\fR that contains the following members: .sp .in +2 .nf ushort_t semval; /* semaphore value */ pid_t sempid; /* pid of last operation */ ushort_t semncnt; /* # awaiting semval > cval */ ushort_t semzcnt; /* # awaiting semval = 0 */ .fi .in -2 .sp .sp .LP The following information describes the \fBsem\fR structure members: .sp .LP The \fBsemval\fR member is a non-negative integer that is the actual value of the semaphore. .sp .LP The \fBsempid\fR member is equal to the process \fBID\fR of the last process that performed a semaphore operation on this semaphore. .sp .LP The \fBsemncnt\fR member is a count of the number of processes that are currently suspended awaiting this semaphore's \fBsemval\fR to become greater than its current value. .sp .LP The \fBsemzcnt\fR member is a count of the number of processes that are currently suspended awaiting this semaphore's \fBsemval\fR to become \fB0\fR. .SS "Semaphore Operation Permissions" .sp .LP In the \fBsemop\fR(2) and \fBsemctl\fR(2) function descriptions, the permission required for an operation is given as {\fItoken\fR}, where \fItoken\fR is the type of permission needed interpreted as follows: .sp .in +2 .nf 00400 READ by user 00200 ALTER by user 00040 READ by group 00020 ALTER by group 00004 READ by others 00002 ALTER by others .fi .in -2 .sp .sp .LP Read and alter permissions for a \fBsemid\fR are granted to a process if one or more of the following conditions are true: .RS +4 .TP .ie t \(bu .el o The {\fBPRIV_IPC_DAC_READ\fR} or {\fBPRIV_IPC_DAC_WRITE\fR} privilege is present in the effective set. .RE .RS +4 .TP .ie t \(bu .el o The effective user \fBID\fR of the process matches \fBsem_perm.cuid\fR or \fBsem_perm.uid\fR in the data structure associated with \fBsemid\fR and the appropriate bit of the "user" portion (0600) of \fBsem_perm.mode\fR is set. .RE .RS +4 .TP .ie t \(bu .el o The effective group \fBID\fR of the process matches \fBsem_perm.cgid\fR or \fBsem_perm.gid\fR and the appropriate bit of the "group" portion (060) of \fBsem_perm.mode\fR is set. .RE .RS +4 .TP .ie t \(bu .el o The appropriate bit of the "other" portion (06) of \fBsem_perm.mode\fR is set. .RE .sp .LP Otherwise, the corresponding permissions are denied. .SS "Session" .sp .LP A session is a group of processes identified by a common \fBID\fR called a session ID, capable of establishing a connection with a controlling terminal. Any process that is not a process group leader may create a new session and process group, becoming the session leader of the session and process group leader of the process group. A newly created process joins the session of its creator. .SS "Session \fBID\fR" .sp .LP Each session in the system is uniquely identified during its lifetime by a positive integer called a session ID, the process \fBID\fR of its session leader. .SS "Session Leader" .sp .LP A session leader is a process whose session \fBID\fR is the same as its process and process group ID. .SS "Session Lifetime" .sp .LP A session lifetime begins when the session is created by its session leader, and ends when the lifetime of the last process that is a member of the session ends, or when the last process that is a member in the session leaves the session. .SS "Shared Memory Identifier" .sp .LP A shared memory identifier (\fBshmid\fR) is a unique positive integer created by a \fBshmget\fR(2) or \fBshmget_osm\fR(2) call. Each \fBshmid\fR has a segment of memory (referred to as a shared memory segment) and a data structure associated with it. (Note that these shared memory segments must be explicitly removed by the user after the last reference to them is removed.) The data structure is referred to as \fBshmid_ds\fR and contains the following members: .sp .in +2 .nf struct ipc_perm shm_perm; /* operation permission struct */ size_t shm_segsz; /* size of segment */ struct anon_map *shm_amp; /* ptr to region structure */ char pad[4]; /* for swap compatibility */ pid_t shm_lpid; /* pid of last operation */ pid_t shm_cpid; /* creator pid */ uintptr_t shm_flags; /* see below */ uint64_t shm_gransize; /* shared memory granule size */ uint64_t shm_allocated;/* shared memory amount allocated */ shmatt_t shm_nattch; /* number of current attaches */ ulong_t shm_cnattch; /* used only for shminfo */ 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, Jan. 1, 1970 */ .fi .in -2 .sp .sp .LP The following information describes the \fBshmid_ds\fR structure members: .sp .LP The \fBshm_perm\fR member is an \fBipc_perm\fR structure that specifies the shared memory operation permission (see below). This structure includes the following members: .sp .in +2 .nf uid_t cuid; /* creator user id */ gid_t cgid; /* creator group id */ uid_t uid; /* user id */ gid_t gid; /* group id */ mode_t mode; /* r/w permission */ ulong_t seq; /* slot usage sequence # */ key_t key; /* key */ .fi .in -2 .sp .sp .LP The \fBshm_segsz\fR member specifies the size of the shared memory segment in bytes. .sp .LP The \fBshm_cpid\fR member is the process \fBID\fR of the process that creates the shared memory identifier. .sp .LP The \fBshm_lpid\fR member is the process \fBID\fR of the last process that performed a \fBshmat()\fR or \fBshmdt()\fR operation (see \fBshmop\fR(2)). .sp .LP If \fBshm_flags\fR has the \fBSHMDS_GRANULE\fR bit set, then the shared memory segment was created using \fBshmget_osm\fR(2), and the \fBshm_gransize\fR and \fBshm_allocated\fR members are valid. The \fBshm_gransize\fR member contains the allocation granule for the segment, and the \fBshm_allocated\fR member contains the amount of memory allocated inside the segment. If \fBshm_flags\fR does not have the \fBSHMDS_GRANULE\fR bit set, then the \fBshm_gransize\fR and \fBshm_allocated\fR members have undefined contents. .sp .LP The \fBshm_nattch\fR member is the number of processes that currently have this segment attached. .sp .LP The \fBshm_atime\fR member is the time of the last \fBshmat()\fR operation (for more information, see \fBshmop\fR(2) man page). .sp .LP The \fBshm_dtime\fR member is the time of the last \fBshmdt()\fR operation (for more information, see \fBshmop\fR(2) man page). .sp .LP The \fBshm_ctime\fR member is the time of the last \fBshmctl\fR(2) operation that changed one of the members of the above structure. .SS "Shared Memory Operation Permissions" .sp .LP In the \fBshmctl\fR(2), \fBshmat()\fR, and \fBshmdt()\fR (see \fBshmop\fR(2)) function descriptions, the permission required for an operation is given as {\fItoken\fR}, where \fItoken\fR is the type of permission needed and it is interpreted as follows: .sp .in +2 .nf 00400 READ by user 00200 WRITE by user 00040 READ by group 00020 WRITE by group 00004 READ by others 00002 WRITE by others .fi .in -2 .sp .sp .LP Read and write permissions for a \fBshmid\fR are granted to a process if one or more of the following conditions are true: .RS +4 .TP .ie t \(bu .el o The {\fBPRIV_IPC_DAC_READ\fR} or {\fBPRIV_IPC_DAC_WRITE\fR} privilege is present in the effective set. .RE .RS +4 .TP .ie t \(bu .el o The effective user \fBID\fR of the process matches \fBshm_perm.cuid\fR or \fBshm_perm.uid\fR in the data structure associated with \fBshmid\fR and the appropriate bit of the "user" portion (0600) of \fBshm_perm.mode\fR is set. .RE .RS +4 .TP .ie t \(bu .el o The effective group \fBID\fR of the process matches \fBshm_perm.cgid\fR or \fBshm_perm.gid\fR and the appropriate bit of the "group" portion (060) of \fBshm_perm.mode\fR is set. .RE .RS +4 .TP .ie t \(bu .el o The appropriate bit of the "other" portion (06) of \fBshm_perm.mode\fR is set. .RE .sp .LP Otherwise, the corresponding permissions are denied. .SS "Special Processes" .sp .LP The process with \fBID\fR 0 and the process with \fBID\fR 1 are special processes referred to as proc0 and proc1; see \fBkill\fR(2). proc0 is the process scheduler. proc1 is the initialization process (\fIinit\fR); \fBproc1\fR is the ancestor of every other process in the system and is used to control the process structure. .SS "\fBSTREAMS\fR" .sp .LP A set of kernel mechanisms that support the development of network services and data communication drivers. It defines interface standards for character \fBI/O\fR within the kernel and between the kernel and user level processes. The STREAMS mechanism is composed of utility routines, kernel facilities, and a set of data structures. .SS "Stream" .sp .LP A stream is a full-duplex data path within the kernel between a user process and driver routines. The primary components of a stream are a stream head, a driver, and zero or more modules between the stream head and driver. A stream is analogous to a shell pipeline, except that data flow and processing are bidirectional. .SS "Stream Head" .sp .LP In a stream, the stream head is the end of the stream that provides the interface between the stream and a user process. The principal functions of the stream head are processing STREAMS-related system calls and passing data and information between a user process and the stream. .SS "Upstream" .sp .LP The direction from driver to stream head in a stream. .SS "Write Queue" .sp .LP In a stream, the message queue in a module or driver containing messages moving downstream. .SH ACKNOWLEDGMENTS .sp .LP Oracle gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at https://publications.opengroup.org/. .sp .LP The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. .sp .LP In the following statement, the phrase "this text" refers to portions of the system documentation. .sp .LP Portions of this text are reprinted and reproduced in electronic form in the Oracle Solaris Reference Manual, from \fIIEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6\fR, Copyright \(co 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at https://www.opengroup.org/unix. .sp .LP This notice shall appear on any product containing this material. .SH SEE ALSO .sp .LP \fBacl\fR(7), \fBprivileges\fR(7), \fBresource-controls\fR(7), \fBstandards\fR(7), \fBsysattr\fR(7), \fBthreads\fR(7) .sp .LP Appendix E, \fISecurity Considerations When Using C Functions,\fR in \fIDeveloper's Guide to Oracle Solaris 11.4 Security\fR