intro(2) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

intro(2)

Intro(2)                         System Calls                         Intro(2)



NAME
       Intro, intro - introduction to system calls and error numbers

SYNOPSIS
       #include <errno.h>

DESCRIPTION
       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.


       Most system calls return one or more error conditions. An error  condi‐
       tion  is  indicated  by  an  otherwise impossible return value. This is
       almost always −1 or the null pointer; the individual descriptions spec‐
       ify  the  details.  An  error  number is made available in the external
       variable errno, which is not cleared on  successful  calls.  So  it  is
       tested only after an error has been indicated.


       Every  thread  has  a  unique  errno value specific to that thread. The
       errno variable is implemented as a  macro  that  references  this  per-
       thread  value.  This  errno  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 -mt option on the command
       line at compilation time to enable  the  per-thread  implementation  of
       errno. The -mt option is no longer required.


       An error value listed as "will fail" describes a condition whose detec‐
       tion and reporting is mandatory for an implementation that conforms  to
       the  Single  UNIX  Specification (SUS). 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
       for an implementation that conforms to the SUS. 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  across
       conforming implementations. 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. For more information regarding the
       Single UNIX Specification, see the standards(7) man page.


       Each system call description attempts to list all possible  error  num‐
       bers. The following list gives the description of the error numbers and
       their names as defined in <errno.h>.

       1 EPERM                Insufficient privileges

                              This error indicates an attempt to modify a file
                              in  a  way  forbidden  except to its owner or an
                              appropriately privileged  process.  It  is  also
                              returned  when  a process attempts to perform an
                              operation  requiring  a  privilege  not  in  its
                              effective set. See privileges(7).

                              The  manual pages for individual functions docu‐
                              ment which privileges are needed to override the
                              restriction.


       2 ENOENT               No such file or directory

                              This  error occurs when a file name is specified
                              but the file doesn't exist, or one of the direc‐
                              tories in the path name does not exist.


       3 ESRCH                No such process

                              This  error  occurs when no process can be found
                              in the system that corresponds to the  specified
                              PID, LWPID_t, or thread_t.


       4 EINTR                Interrupted system call

                              This  error  occurs  when an asynchronous signal
                              (such as interrupt or quit), which the user  has
                              elected  to catch, occurred during a system ser‐
                              vice function. If  execution  is  resumed  after
                              processing  the signal, it will appear as if the
                              interrupted function call  returned  this  error
                              condition.

                              In  a  multithreaded  application,  EINTR may be
                              returned whenever another thread  or  LWP  calls
                              fork(2).


       5 EIO                  I/O error

                              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.


       6 ENXIO                No such device or address

                              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  disk  pack  is loaded on a
                              drive.


       7 E2BIG                Arg list too long

                              This error occurs when an argument  list  longer
                              than  ARG_MAX  bytes is presented to a member of
                              the exec family of functions (see exec(2)).  The
                              argument  list  limit  is the sum of the size of
                              the argument list plus the size of the  environ‐
                              ment's exported shell variables.


       8 ENOEXEC              Exec format error

                              This error occurs when a request is made to exe‐
                              cute a file which, although it has the appropri‐
                              ate  permissions,  does  not  start with a valid
                              format (see a.out(5)).


       9 EBADF                Bad file number

                              This error occurs when either a file  descriptor
                              refers  to  no  open file, or a read(2) (respec‐
                              tively, write(2)) request is made to a file that
                              is  open  only  for writing (respectively, read‐
                              ing).


       10 ECHILD              No child processes

                              This error occurs when a wait(3C) function  call
                              is executed by a process that has no existing or
                              unwaited-for child processes.


       11 EAGAIN              Resource temporarily unavailable

                              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  fork(2)
                              function failed because the system's process ta‐
                              ble is full or the user is not allowed to create
                              any  more processes, or a call failed because of
                              insufficient memory or swap space.


       12 ENOMEM              Cannot allocate memory

                              This error occurs during execution of  brk()  or
                              sbrk()  (see  brk(2)), or one of the exec family
                              of functions. A program asks for more space than
                              the system is able to supply. This is not a tem‐
                              porary 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 fork(2) function.


       13 EACCES              Permission denied

                              This  error  occurs  when  an attempt is made to
                              access a file in a way forbidden by the  protec‐
                              tion system.

                              The  manual pages for individual functions docu‐
                              ment the privileges that are needed to  override
                              the protection system.


       14 EFAULT              Bad address

                              This  error  occurs when the system encounters a
                              hardware fault in attempting to use an  argument
                              of a routine. For example, errno potentially may
                              be set to EFAULT 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 adi(3C) man page.


       15 ENOTBLK             Block device required

                              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 mount(2)
                              function).


       16 EBUSY               Device busy

                              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 seg‐
                              ment). It will also occur if an attempt is  made
                              to enable accounting when it is already enabled.
                              The device or resource is currently unavailable.
                              EBUSY  is also used by mutexes, semaphores, con‐
                              dition variables, and  r/w  locks,  to  indicate
                              that  a  lock is held, and by the processor con‐
                              trol function P_ONLINE.


       17 EEXIST              File exists

                              This error occurs when an existing file is  men‐
                              tioned in an inappropriate context (for example,
                              call to the link(2) function).


       18 EXDEV               Cross-device link

                              This error occurs when a hard link to a file  on
                              another device is attempted.


       19 ENODEV              No such device

                              This  error  occurs  when  an attempt is made to
                              apply an inappropriate  operation  to  a  device
                              (for example, read a write-only device).


       20 ENOTDIR             Not a directory

                              This error occurs when a non-directory is speci‐
                              fied where a directory is required (for example,
                              in  a  path  prefix  or  as  an  argument to the
                              chdir(2) function).


       21 EISDIR              Is a directory

                              This error occurs when an  attempt  is  made  to
                              write on a directory.


       22 EINVAL              Invalid argument

                              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 signal(3C) or kill(2)  function,  or
                              an  unsupported  operation  related  to extended
                              attributes is attempted.


       23 ENFILE              File table overflow

                              This error occurs when the system file table  is
                              full (that is, SYS_OPEN files are open, and tem‐
                              porarily no more files can be opened).


       24 EMFILE              Too many open files

                              This error occurs when no process may have  more
                              than OPEN_MAX file descriptors open at a time.


       25 ENOTTY              Inappropriate ioctl for device

                              This  error  occurs  when a call was made to the
                              ioctl(2) function with a  request  that  is  not
                              valid  for  the  given  file descriptor, such as
                              specifying a file that is not a special  charac‐
                              ter  device, or specifying a request that is not
                              supported for the given device type.


       26 ETXTBSY             Text file busy (obsolete)

                              This error occurs when an  attempt  is  made  to
                              execute  a  pure-procedure  program that is cur‐
                              rently open for writing. Also an attempt to open
                              for  writing  or to remove a pure-procedure pro‐
                              gram that is being executed.  (This  message  is
                              obsolete.)


       27 EFBIG               File too large

                              This  error  occurs  when  the  size of the file
                              exceeds  the   limit   specified   by   resource
                              RLIMIT_FSIZEn; the file size exceeds the maximum
                              supported by the file system; or the  file  size
                              exceeds  the offset maximum of the file descrip‐
                              tor. See the File Descriptor subsection  of  the
                              DEFINITIONS section below.


       28 ENOSPC              No space left on device

                              This  error  occurs  while  creating a directory
                              entry or writing an ordinary file, there  is  no
                              free  space  left on the device. In the fcntl(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.


       29 ESPIPE              Illegal seek

                              This  error  occurs  when a call to the lseek(2)
                              function is issued to a pipe.


       30 EROFS               Read-only file system

                              This error occurs when an attempt  to  modify  a
                              file  or  directory  is made on a device mounted
                              read-only.


       31 EMLINK              Too many links

                              This error occurs an attempt to make  more  than
                              the  maximum  number  of  links,  LINK_MAX, to a
                              file.


       32 EPIPE               Broken pipe

                              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.


       33 EDOM                Argument out of domain

                              This  error  occurs when the argument of a func‐
                              tion in the math package  (3M)  is  out  of  the
                              domain of the function.


       34 ERANGE              Result too large

                              This  error  occurs when the value of a function
                              in the math package (3M)  is  not  representable
                              within machine precision.


       35 ENOMSG              No message of desired type

                              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 msgrcv(2)).


       36 EIDRM               Identifier removed

                              This  error is returned to processes that resume
                              execution due to the removal  of  an  identifier
                              from   the   file   system's   name  space  (see
                              msgctl(2), semctl(2), and shmctl(2)).


       37 ECHRNG              Channel number out of range


       38 EL2NSYNC            Level 2 not synchronized


       39 EL3HLT              Level 3 halted


       40 EL3RST              Level 3 reset


       41 ELNRNG              Link number out of range


       42 EUNATCH             Protocol driver not attached


       43 ENOCSI              No CSI structure available


       44 EL2HLT              Level 2 halted


       45 EDEADLK             Deadlock situation detected/avoided

                              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.


       46 ENOLCK              No record locks available

                              This error occurs when there are no  more  locks
                              available.  The  system  lock table is full (see
                              fcntl(2)).


       47 ECANCELED           Operation canceled

                              This error occurs when the associated  asynchro‐
                              nous operation is canceled before completion.


       48 ENOTSUP             Operation not supported

                              This  error occurs when this version of the sys‐
                              tem does not support the  feature.  Future  ver‐
                              sions of the system may provide support.


       49 EDQUOT              Disc quota exceeded

                              A  write(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 allo‐
                              cation  of  an  inode  for  a newly created file
                              failed because the user's quota  of  inodes  was
                              exhausted.


       50 ECKSUM              Checksum failure


       51 EFRAGS              Too fragmented


       52 EXFULL              Message tables full


       53 ENOKEY              Cryptographic key not available


       58 EOWNERDEAD          Owner of the lock died

                              An  attempt to acquire a robust mutex succeeded,
                              but the state protected  by  the  mutex  may  be
                              inconsistent as the prior owner terminated with‐
                              out unlocking it. See mutex_init(3C) for further
                              information.


       59 ENOTRECOVERABLE     Lock is not recoverable

                              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
                              mutex_init(3C) for further information.


       60 ENOSTR              Not a stream device

                              A putmsg(2) or getmsg(2) call was attempted on a
                              file descriptor that is not a STREAMS device.


       61 ENODATA             No data available


       62 ETIME               Timer expired

                              This error occurs  when  the  timer  set  for  a
                              STREAMS  ioctl(2) call has expired. The cause of
                              this error is device-specific and could indicate
                              either  a  hardware or software failure, or per‐
                              haps a timeout value that is too short  for  the
                              specific  operation.  The  status of the ioctl()
                              operation  is  indeterminate.   This   is   also
                              returned  in  the case of _lwp_cond_timedwait(2)
                              or cond_timedwait(3C).


       63 ENOSR               Out of stream resources

                              During  a  STREAMS   open(2)  call,  either   no
                              STREAMS  queues  or  no STREAMS head data struc‐
                              tures were available. This is a temporary condi‐
                              tion; one may recover from it if other processes
                              release resources.


       64 ENONET              Machine is not on the network


       65 ENOPKG              Package not installed

                              This error occurs when users attempt  to  use  a
                              call   from   a   package  which  has  not  been
                              installed.


       66 EREMOTE             Object is remote

                              This error occurs when  users  try  to  share  a
                              resource  that  is  not on the local machine, or
                              try to mount(2) or umount(2) a  device  or  path
                              name that is on a remote machine.


       67 ENOLINK             Link has been severed

                              An  operation  on a file failed because the file
                              is on a remote machine  and  the  link  to  that
                              machine is no longer active.


       68 EADV                Advertise error (obsolete)

                              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 force‐
                              ably  unmount  a  resource  that is still adver‐
                              tised.


       69 ESRMNT              Srmount error (obsolete)

                              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.


       70 ECOMM               Communication error on send

                              An operation on a file failed because  the  file
                              is  on  a  remote  machine  and the link to that
                              machine is no longer active.


       71 EPROTO              Protocol error

                              This  error  occurs  when  some  protocol  error
                              occurs.  This  error  is device-specific, but is
                              generally not related to a hardware failure.


       72 ELOCKUNMAPPED       Locked lock was unmapped (obsolete)

                              An obsolete error  message,  since  replaced  by
                              EOWNERDEAD.   See   mutex_init(3C)  for  further
                              information.


       73 ENOTACTIVE          Facility is not active

                              A system  call  failed  because  it  required  a
                              facillity, such as Extended Accounting, that was
                              not active.


       74 EMULTIHOP           Multihop attempted

                              A call failed because components of a file  path
                              require  hopping to multiple remote machines and
                              the file system does not allow it.


       75 EADI                Application Data Integrity mismatch detected

                              This error occurs when an ADI  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 adi(7).


       77 EBADMSG             Not a data message

                              During   a   read(2),   getmsg(2),  or  ioctl(2)
                              I_RECVFD call to a STREAMS device, something has
                              come  to  the  head  of the queue that cannot be
                              processed. That something depends on the call:

                              read():    control information  or  passed  file
                                         descriptor.


                              getmsg():  passed file descriptor.


                              ioctl():   control or data information.



       78 ENAMETOOLONG        File name too long

                              This  error  occurs  when the length of the path
                              argument exceeds PATH_MAX, or the  length  of  a
                              path    component    exceeds    NAME_MAX   while
                              _POSIX_NO_TRUNC   is   in   effect;   see   lim‐
                              its.h(3HEAD).


       79 EOVERFLOW           Value too large for defined data type

                              This error occurs when a value is outside of the
                              range defined for the data  type  it  is  to  be
                              stored in.


       80 ENOTUNIQ            Name not unique on network

                              This  error  occurs when a given log name is not
                              unique.


       81 EBADFD              File descriptor in bad state

                              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.


       82 EREMCHG             Remote address changed


       83 ELIBACC             Cannot access a needed shared library (obsolete)

                              Trying to exec an a.out that requires  a  static
                              shared  library  and  the  static shared library
                              does not exist or the user does not have permis‐
                              sion to use it.


       84 ELIBBAD             Accessing a corrupted shared library (obsolete)

                              Trying  to  exec an a.out that requires a static
                              shared library (to be linked in) and exec  could
                              not  load  the static shared library. The static
                              shared library is probably corrupted.


       85 ELIBSCN             .lib section in a.out corrupted (obsolete)

                              Trying to exec an a.out that requires  a  static
                              shared  library  (to be linked in) and there was
                              erroneous data in the .lib section of the a.out.
                              The  .lib  section tells exec what static shared
                              libraries are needed. The a.out is probably cor‐
                              rupted.


       86 ELIBMAX             Attempting to link in more shared libraries than
                              system limit (obsolete)

                              Trying to  exec  an  a.out  that  requires  more
                              static  shared  libraries than is allowed on the
                              current configuration of the system.


       87 ELIBEXEC            Cannot exec a shared library directly (obsolete)

                              This error occurs while  attempting  to  exec  a
                              shared library directly.


       88 EILSEQ              Illegal byte sequence

                              This  error  occurs  if there is a byte sequence
                              that is not valid  for  the  expected  character
                              encoding.


       89 ENOSYS              Operation not applicable


       90 ELOOP               Number of symbolic links encountered during path
                              name traversal exceeds MAXSYMLINKS


       91 ERESTART            Restartable system call

                              This error occurs  when  an  interrupted  system
                              call  should  be restarted (not externally visi‐
                              ble).


       92 ESTRPIPE            If pipe/FIFO, don't sleep in stream head

                              Streams pipe error (not externally visible).


       93 ENOTEMPTY           Directory not empty


       94 EUSERS              Too many users


       95 ENOTSOCK            Socket operation on non-socket


       96 EDESTADDRREQ        Destination address required

                              This error occurs when  a  required  address  is
                              omitted  from  an  operation on a transport end‐
                              point. Destination address is required.


       97 EMSGSIZE            Message too long

                              This error occurs  when  a  message  sent  on  a
                              transport  provider  is larger than the internal
                              message buffer or some other network limit.


       98 EPROTOTYPE          Protocol wrong type for socket

                              This error occurs when a protocol specified does
                              not  support  the  semantics  of the socket type
                              requested.


       99 ENOPROTOOPT         Option not supported by protocol

                              This error occurs when a bad option or level  is
                              specified  when getting or setting options for a
                              protocol.


       120 EPROTONOSUPPORT    Protocol not supported

                              The protocol has not been  configured  into  the
                              system or no implementation for it exists.


       121 ESOCKTNOSUPPORT    Socket type not supported

                              The  support  for  the  socket type has not been
                              configured into the system or no  implementation
                              for it exists.


       122 EOPNOTSUPP         Operation not supported on transport endpoint

                              For  example, trying to accept a connection on a
                              datagram transport endpoint.


       123 EPFNOSUPPORT       Protocol family not supported

                              The protocol family has not been configured into
                              the  system  or no implementation for it exists.
                              Used for the Internet protocols.


       124 EAFNOSUPPORT       Address family not supported by protocol family

                              This error occurs when an  address  incompatible
                              with the requested protocol is used.


       125 EADDRINUSE         Address already in use

                              This error occurs when a user attempts to use an
                              address already in use, and  the  protocol  does
                              not allow this.


       126 EADDRNOTAVAIL      Cannot assign requested address

                              Results  from  an  attempt to create a transport
                              endpoint with an  address  not  on  the  current
                              machine.


       127 ENETDOWN           Network is down

                              Operation encountered a dead network.


       128 ENETUNREACH        Network is unreachable

                              Operation  was  attempted to an unreachable net‐
                              work.


       129 ENETRESET          Network dropped connection because of reset

                              This error occurs when the  host  you  are  con‐
                              nected to crashes and reboots.


       130 ECONNABORTED       Software caused connection abort

                              A  connection  abort was caused internal to your
                              host machine.


       131 ECONNRESET         Connection reset by peer

                              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.


       132 ENOBUFS            No buffer space available

                              This error occurs when an operation on a  trans‐
                              port  endpoint  or pipe is not performed because
                              the system lacked  sufficient  buffer  space  or
                              because a queue is full.


       133 EISCONN            Transport endpoint is already connected

                              This error occurs when a connect request is made
                              on an already connected transport endpoint;  or,
                              a  sendto()  or sendmsg() request on a connected
                              transport endpoint specified a destination  when
                              already connected.


       134 ENOTCONN           Transport endpoint is not connected

                              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.


       143 ESHUTDOWN          Cannot send after socket shutdown

                              This error occurs when a request to send data is
                              disallowed  because  the  transport endpoint has
                              already been shut down.


       144 ETOOMANYREFS       Too many references: cannot splice


       145 ETIMEDOUT          Connection timed out

                              This error occurs when a connect or send request
                              fails because the connected party does not prop‐
                              erly responds after a period of time; or a write
                              or  fsync  request fails because a file is on an
                              NFS file system mounted with the soft option.


       146 ECONNREFUSED       Connection refused

                              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.


       147 EHOSTDOWN          Host is down

                              This error  occurs  when  a  transport  provider
                              operation  fails because the destination host is
                              down.


       148 EHOSTUNREACH       No route to host

                              This error  occurs  when  a  transport  provider
                              operation is attempted to an unreachable host.


       149 EALREADY           Operation already in progress

                              This error occurs when an operation is attempted
                              on a non-blocking object  that  already  has  an
                              operation in progress.


       150 EINPROGRESS        Operation now in progress

                              This error occurs when an operation that takes a
                              long time to complete (such as a  connect())  is
                              attempted on a non-blocking object.


       151 ESTALE             Stale NFS file handle

                              A  file  or  directory that was opened by an NFS
                              client was either removed  or  replaced  on  the
                              server.


DEFINITIONS
   Background Process Group
       Any process group that is not the foreground process group of a session
       that has established a connection with a controlling terminal.

   Controlling Process
       A session leader that established a connection to a controlling  termi‐
       nal.

   Controlling Terminal
       A terminal that is associated with a session. Each session may have, at
       most, one controlling terminal associated with  it  and  a  controlling
       terminal  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 termio(4I) man page.

   Directory
       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, . (dot) and ..
       (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 / and the parent directory of the
       root directory is /.

   Downstream
       The direction from the stream head to the driver in a stream.

   Driver
       In a stream, the driver provides the interface between peripheral hard‐
       ware  and  the  stream. A driver can also be a pseudo-driver, such as a
       multiplexor or log driver (see log(4D)), which is not associated with a
       hardware device.

   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  (see  below).  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 (see exec(2)).

   File Access Permissions
       Read, write, and execute/search permissions for a file are granted to a
       process if one or more of the following conditions are true:

           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.


           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.


           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.


           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: {PRIV_FILE_DAC_READ} for the
                  read  bit,  {PRIV_FILE_DAC_WRITE}   for   the   write   bit,
                  {PRIV_FILE_DAC_SEARCH}  for  the execute bit on directories,
                  and {PRIV_FILE_DAC_EXECUTE} for the executable bit on  plain
                  files.


           o      The  file  has  an  Access  Control List (ACL) with an entry
                  granting permission to the user or group of the process. See
                  acl(7) for details.



       Otherwise, the corresponding permissions are denied.

   File Descriptor
       A  file descriptor is a small integer used to perform I/O operations on
       a file. The value of a file descriptor is  from  0  to  (NOFILES−1).  A
       process  may have no more than NOFILES file descriptors open simultane‐
       ously. A file descriptor is  returned  by  calls  such  as  open(2)  or
       pipe(2).  The  file  descriptor is used as an argument by calls such as
       read(2), write(2), ioctl(2), and close(2).


       Each file descriptor has a corresponding offset  maximum.  For  regular
       files  that are opened without setting the O_LARGEFILE flag, the offset
       maximum is 2 Gbyte − 1 byte (2^31 −1 bytes). For regular files that are
       opened  with  the  O_LARGEFILE  flag set, the offset maximum is 2^63 −1
       bytes.

   File Name
       Names consisting of 1 to NAME_MAX characters are used to name an  ordi‐
       nary file, special file or directory.


       These  characters  are  selected  from  the set of all character values
       excluding \0 (null) and the ASCII code for / (slash).


       Note that it is generally unwise to use *, ?, [, or ] as part  of  file
       names  because  of  the special meaning attached to these characters by
       the shell (see sh(1), csh(1), and ksh(1)). Although permitted, the  use
       of unprintable characters in file names should be avoided.


       A  file  name  is  sometimes  referred  to as a pathname component. The
       interpretation of a pathname component is dependent on  the  values  of
       NAME_MAX  and  _POSIX_NO_TRUNC  associated with the path prefix of that
       component.  If  any  pathname  component  longer  than   NAME_MAX   and
       _POSIX_NO_TRUNC is in effect for the path prefix of that component (see
       fpathconf(2) and limits.h(3HEAD)), it shall be considered an error con‐
       dition  in that implementation. Otherwise, the implementation shall use
       the first NAME_MAX bytes of the pathname component.

   Foreground Process Group
       Each session that has established a connection with a controlling  ter‐
       minal  will  distinguish  one process group of the session as the fore‐
       ground process group of the controlling terminal. This group  has  cer‐
       tain privileges when accessing its controlling terminal that are denied
       to background process groups.

   {IOV_MAX}
       Maximum number of entries in a struct iovec array.

   {LIMIT}
       The braces notation, {LIMIT}, 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 path‐
       conf(2) with the name argument _PC_LIMIT.

   Masks
       The file mode creation mask of the process used during any create func‐
       tion  calls  to turn off permission bits in the mode argument supplied.
       Bit positions that are set in umask(cmask) are cleared in the  mode  of
       the created file.

   Message
       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.

   Message Queue
       In a stream, a linked list of messages awaiting processing by a  module
       or driver.

   Message Queue Identifier
       A message queue identifier (msqid) is a unique positive integer created
       by a msgget(2) call. Each msqid has a message queue and a  data  struc‐
       ture  associated with it. The data structure is referred to as msqid_ds
       and contains the following members:

         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;



       The following information describes the msqid_ds structure members:


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

         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 */



       The *msg_first member is a pointer to the first message on the queue.


       The *msg_last member is a pointer to the last message on the queue.


       The msg_cbytes member is the current number of bytes on the queue.


       The msg_qnum member is the number of messages currently on the queue.


       The msg_qbytes member is the maximum number of  bytes  allowed  on  the
       queue.


       The  msg_lspid  member  is the process ID of the last process that per‐
       formed a msgsnd() operation.


       The msg_lrpid member is the process id of the last  process  that  per‐
       formed a msgrcv() operation.


       The msg_stime member is the time of the last msgsnd() operation.


       The msg_rtime member is the time of the last msgrcv() operation.


       The  msg_ctime  member  is the time of the last msgctl() operation that
       changed a member of the above structure.

   Message Operation Permissions
       In the msgctl(2), msgget(2), msgrcv(2), and msgsnd(2) function descrip‐
       tions,  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   WRITE by user
         00040   READ by group
         00020   WRITE by group
         00004   READ by others
         00002   WRITE by others



       Read and write permissions for a msqid are granted to a process if  one
       or more of the following conditions are true:

           o      The {PRIV_IPC_DAC_READ} or {PRIV_IPC_DAC_WRITE} privilege is
                  present in the effective set.


           o      The effective user ID of the process  matches  msg_perm.cuid
                  or  msg_perm.uid in the data structure associated with msqid
                  and the appropriate bit of  the  "user"  portion  (0600)  of
                  msg_perm.mode is set.


           o      Any group ID in the process credentials from the set matches
                  msg_perm.cgid or msg_perm.gid and the appropriate bit of the
                  "group" portion (060) of msg_perm.mode is set.


           o      The   appropriate  bit  of  the  "other"  portion  (006)  of
                  msg_perm.mode is set."



       Otherwise, the corresponding permissions are denied.

   Module
       A module is an entity containing processing routines for input and out‐
       put  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.

   Multiplexor
       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  con‐
       structing   them  and  for  connecting  multiplexed  configurations  of
       streams.

   Offset Maximum
       An offset maximum is an attribute of an open  file  description  repre‐
       senting the largest value that can be used as a file offset.

   Orphaned Process Group
       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.

   Parent Process ID
       A  new  process is created by a currently active process (see fork(2)).
       The parent process ID of a process is the process ID of its creator.

   Path Name
       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 direc‐
       tory.


       A slash by itself names the root directory.


       Unless specifically stated otherwise, the null path name is treated  as
       if it named a non-existent file.

   Privilege
       Having  appropriate  privileges means having the capability to override
       system restrictions. On Solaris, these are represented as sets of priv‐
       ileges that provide fine-grained control over the actions a process can
       take. Specific privileges are denoted in man pages as {PRIV_NAME},  and
       are  listed  and defined in the privileges(7) man page. When referenced
       in source code, the braces are not included.

   Privileged User
       Solaris software implements a set  of  privileges  that  provide  fine-
       grained control over the actions of processes. The possession of a cer‐
       tain 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 privileges(7) for the seman‐
       tics and the degree of backward compatibility awarded to processes with
       an effective uid of 0.

   Process Group
       Each process in the system is a member of a process group that is iden‐
       tified  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.

   Process Group Leader
       A process group leader is a process whose process ID is the same as its
       process group ID.

   Process Group ID
       Each active process is a member of a process group and 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 more information, see kill(2) man page).

   Process ID
       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 life‐
       time, 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 thread_t and LWPID_t.  These  threads  are  not
       visible to the outside process.

   Process Lifetime
       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 wait(3C) man page.

   Process Group Lifetime
       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.

   Processor Set ID
       The processors in a system may be divided into subsets, known  as  pro‐
       cessor sets. A process bound to one of these sets will run only on pro‐
       cessors 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
       pset_create(2) man page.

   Read Queue
       In  a  stream,  the message queue in a module or driver containing mes‐
       sages moving upstream.

   Real User ID and Real Group ID
       Each user allowed on the system is identified by a positive integer  (0
       to MAXUID) 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 responsi‐
       ble for the creation of the process.

   Root Directory and Current Working Directory
       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  direc‐
       tory of the root file system.

   Saved Resource Limits
       Saved  resource  limits is an attribute of a process that provides some
       flexibility in the handling  of  unrepresentable  resource  limits,  as
       described in the exec family of functions and setrlimit(2).

   Saved User ID and Saved Group ID
       The  saved  user  ID and saved group ID are the values of the effective
       user ID and effective group ID just after an exec of a file  whose  set
       user or set group file mode bit has been set (see exec(2)).

   Semaphore Identifier
       A  semaphore identifier (semid) is a unique positive integer created by
       a semget(2) call. Each semid has a set of semaphores and a data  struc‐
       ture  associated with it. The data structure is referred to as semid_ds
       and contains the following members:

         struct ipc_perm   sem_perm;    /* operation permission struct */
         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 */



       The following are descriptions of the semid_ds structure members:


       The sem_perm member is an ipc_perm structure that specifies  the  sema‐
       phore  operation  permission  (see  below). This structure includes the
       following members:

         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 */



       The sem_nsems 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 sem_num. sem_num values run sequentially from 0 to the
       value of sem_nsems minus 1.


       The sem_otime member is the time of the last semop(2) operation.


       The  sem_ctime  member is the time of the last semctl(2) operation that
       changed a member of the above structure.


       A semaphore is a data structure called sem that contains the  following
       members:

         ushort_t   semval;    /* semaphore value */
         pid_t      sempid;    /* pid of last operation  */
         ushort_t   semncnt;   /* # awaiting semval > cval */
         ushort_t   semzcnt;   /* # awaiting semval = 0 */



       The following information describes the sem structure members:


       The semval member is a non-negative integer that is the actual value of
       the semaphore.


       The sempid member is equal to the process ID of the last  process  that
       performed a semaphore operation on this semaphore.


       The  semncnt member is a count of the number of processes that are cur‐
       rently suspended awaiting this semaphore's  semval  to  become  greater
       than its current value.


       The  semzcnt member is a count of the number of processes that are cur‐
       rently suspended awaiting this semaphore's semval to become 0.

   Semaphore Operation Permissions
       In the semop(2) and semctl(2)  function  descriptions,  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 for a semid are granted to a process if  one
       or more of the following conditions are true:

           o      The {PRIV_IPC_DAC_READ} or {PRIV_IPC_DAC_WRITE} privilege is
                  present in the effective set.


           o      The effective user ID of the process  matches  sem_perm.cuid
                  or  sem_perm.uid in the data structure associated with semid
                  and the appropriate bit of  the  "user"  portion  (0600)  of
                  sem_perm.mode is set.


           o      The  effective group ID of the process matches sem_perm.cgid
                  or sem_perm.gid and the appropriate bit of the "group"  por‐
                  tion (060) of sem_perm.mode is set.


           o      The   appropriate   bit  of  the  "other"  portion  (06)  of
                  sem_perm.mode is set.



       Otherwise, the corresponding permissions are denied.

   Session
       A session is a group of processes identified by a common  ID  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 ses‐
       sion and process group leader of the process  group.  A  newly  created
       process joins the session of its creator.

   Session ID
       Each  session  in the system is uniquely identified during its lifetime
       by a positive integer called a session ID, the process ID of  its  ses‐
       sion leader.

   Session Leader
       A  session  leader  is  a  process  whose session ID is the same as its
       process and process group ID.

   Session Lifetime
       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.

   Shared Memory Identifier
       A shared memory identifier (shmid) is a unique positive integer created
       by a shmget(2) or shmget_osm(2) call. Each shmid has a segment of  mem‐
       ory (referred to as a shared memory segment) and a data structure asso‐
       ciated with it. (Note that these shared memory segments must be explic‐
       itly  removed by the user after the last reference to them is removed.)
       The data structure is referred to as shmid_ds and contains the  follow‐
       ing members:

         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 */



       The following information describes the shmid_ds structure members:


       The  shm_perm member is an ipc_perm structure that specifies the shared
       memory operation permission (see below). This  structure  includes  the
       following members:

         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 */



       The shm_segsz member specifies the size of the shared memory segment in
       bytes.


       The shm_cpid member is the process ID of the process that  creates  the
       shared memory identifier.


       The  shm_lpid  member  is  the process ID of the last process that per‐
       formed a shmat() or shmdt() operation (see shmop(2)).


       If shm_flags has the SHMDS_GRANULE bit set, then the shared memory seg‐
       ment   was  created  using  shmget_osm(2),  and  the  shm_gransize  and
       shm_allocated members are valid. The shm_gransize member  contains  the
       allocation  granule  for the segment, and the shm_allocated member con‐
       tains the amount of memory allocated inside the segment.  If  shm_flags
       does  not  have  the  SHMDS_GRANULE  bit set, then the shm_gransize and
       shm_allocated members have undefined contents.


       The shm_nattch member is the number of processes  that  currently  have
       this segment attached.


       The  shm_atime  member  is  the time of the last shmat() operation (for
       more information, see shmop(2) man page).


       The shm_dtime member is the time of the  last  shmdt()  operation  (for
       more information, see shmop(2) man page).


       The  shm_ctime  member is the time of the last shmctl(2) operation that
       changed one of the members of the above structure.

   Shared Memory Operation Permissions
       In the shmctl(2), shmat(), and shmdt() (see shmop(2)) function descrip‐
       tions,  the  permission  required for an operation is given as {token},
       where token is the type of permission needed and it is  interpreted  as
       follows:

         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 for a shmid are granted to a process if one
       or more of the following conditions are true:

           o      The {PRIV_IPC_DAC_READ} or {PRIV_IPC_DAC_WRITE} privilege is
                  present in the effective set.


           o      The  effective  user ID of the process matches shm_perm.cuid
                  or shm_perm.uid in the data structure associated with  shmid
                  and  the  appropriate  bit  of  the "user" portion (0600) of
                  shm_perm.mode is set.


           o      The effective group ID of the process matches  shm_perm.cgid
                  or  shm_perm.gid and the appropriate bit of the "group" por‐
                  tion (060) of shm_perm.mode is set.


           o      The  appropriate  bit  of  the  "other"  portion   (06)   of
                  shm_perm.mode is set.



       Otherwise, the corresponding permissions are denied.

   Special Processes
       The  process  with ID 0 and the process with ID 1 are special processes
       referred to as proc0 and proc1;  see  kill(2).  proc0  is  the  process
       scheduler.  proc1  is  the  initialization process (init); proc1 is the
       ancestor of every other process in the system and is  used  to  control
       the process structure.

   STREAMS
       A set of kernel mechanisms that support the development of network ser‐
       vices and data communication drivers. It  defines  interface  standards
       for  character  I/O  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.

   Stream
       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.

   Stream Head
       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  func‐
       tions  of  the  stream head are processing STREAMS-related system calls
       and passing data and information between a user process and the stream.

   Upstream
       The direction from driver to stream head in a stream.

   Write Queue
       In a stream, the message queue in a module or  driver  containing  mes‐
       sages moving downstream.

ACKNOWLEDGMENTS
       Oracle  gratefully acknowledges The Open Group for permission to repro‐
       duce portions of its copyrighted documentation. Original  documentation
       from  The  Open  Group  can  be  obtained  online  at  https://publica‐
       tions.opengroup.org/.


       The Institute of Electrical and  Electronics  Engineers  and  The  Open
       Group, have given us permission to reprint portions of their documenta‐
       tion.


       In the following statement, the phrase "this text" refers  to  portions
       of the system documentation.


       Portions  of  this text are reprinted and reproduced in electronic form
       in the Oracle Solaris Reference Manual, from IEEE Std 1003.1, 2004 Edi‐
       tion,  Standard for Information Technology -- Portable Operating System
       Interface (POSIX), The Open Group Base Specifications  Issue  6,  Copy‐
       right  © 2001-2004 by the Institute of Electrical and Electronics Engi‐
       neers, 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.open‐
       group.org/unix.


       This notice shall appear on any product containing this material.

SEE ALSO
       acl(7), privileges(7), resource-controls(7), standards(7), threads(7)



Oracle Solaris 11.4               3 Nov 2021                          Intro(2)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3