svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
unistd.h(3head)
unistd.h(3HEAD) Headers unistd.h(3HEAD)
NAME
unistd.h, unistd - standard symbolic constants and types
SYNOPSIS
#include <unistd.h>
DESCRIPTION
The <unistd.h> header defines a number of symbolic constants and struc‐
tures which are not already defined or declared in some other header,
especially those required by the POSIX, SUS, and XPG standards. See
standards(7).
Version Test Macros
The following symbolic constants are defined (with fixed values):
_POSIX_VERSION Integer value indicating version of the POSIX
standard (C language binding).
_POSIX2_VERSION Integer value indicating version of the POSIX.2
standard (Commands).
_POSIX2_C_VERSION Integer value indicating version of the POSIX.2
standard (C language binding).
_XOPEN_VERSION Integer value indicating version of the XPG to
which system conforms.
_XOPEN_XCU_VERSION Integer value indicating the version of the XCU
specification to which the implementation con‐
forms. If this constant is not defined, use the
sysconf(3C) function to determine which features
are supported. This constant is not defined for
the SUSv3 environment.
Mandatory Symbolic Constants
The following symbolic constants, if defined in <unistd.h>, have a
value of -1, 0, or greater, unless otherwise specified below. If these
are undefined, the fpathconf(2), pathconf(2), or sysconf(3C) functions
can be used to determine whether the option is provided for a particu‐
lar invocation of the application.
If a symbolic constant is defined with the value -1, the option is not
supported. Headers, data types, and function interfaces required only
for the option need not be supplied. An application that attempts to
use anything associated only with the option is considered to be re‐
quiring an extension.
If a symbolic constant is defined with a value greater than zero, the
option is always supported when the application is executed. All head‐
ers, data types, and functions are present and operate as specified.
If a symbolic constant is defined with the value zero, all headers,
data types, and functions are present. The application can check at
runtime to see whether the option is supported by calling fpathconf(),
pathconf(), or sysconf() with the indicated name parameter.
Unless explicitly specified otherwise, the behavior of functions asso‐
ciated with an unsupported option is unspecified, and an application
that uses such functions without first checking fpathconf(), path‐
conf(), or sysconf() is considered to be requiring an extension.
_POSIX_ADVISORY_INFO
Implementation supports the Advisory Information option.
_POSIX_ASYNCHRONOUS_IO
Implementation supports the Asynchronous Input and Output option.
_POSIX_BARRIERS
Implementation supports the Barriers option.
_POSIX_CLOCK_SELECTION
Implementation supports the Clock Selection option.
_POSIX_CPUTIME
Implementation supports the Process CPU-Time Clocks option.
_POSIX_FSYNC
Implementation supports the File Synchronisation option.
_POSIX_IPV6
Implementation supports the IPv6 option.
_POSIX_JOB_CONTROL
Implementation supports job control.
_POSIX_MAPPED_FILES
Implementation supports the Memory Mapped Files option.
_POSIX_MEMLOCK
Implementation supports the Process Memory Locking option.
_POSIX_MEMLOCK_RANGE
Implementation supports the Range Memory Locking option.
_POSIX_MEMORY_PROTECTION
Implementation supports the Memory Protection option.
_POSIX_MESSAGE_PASSING
Implementation supports the Message Passing option.
_POSIX_MONOTONIC_CLOCK
Implementation supports the Monotonic Clock option.
_POSIX_PRIORITY_SCHEDULING
Implementation supports the Process Scheduling option.
_POSIX_RAW_SOCKETS
Implementation supports the Raw Sockets option.
_POSIX_READER_WRITER_LOCKS
Implementation supports the Read-Write Locks option.
_POSIX_REALTIME_SIGNALS
Implementation supports the Realtime Signals Extension option.
_POSIX_REGEXP
Implementation supports the Regular Expression Handling option.
_POSIX_SAVED_IDS
The exec functions (see exec(2)) save the effective user and group.
_POSIX_SEMAPHORES
Implementation supports the Semaphores option.
_POSIX_SHARED_MEMORY_OBJECTS
Implementation supports the Shared Memory Objects option.
_POSIX_SHELL
Implementation supports the POSIX shell.
_POSIX_SPAWN
Implementation supports the Spawn option.
_POSIX_SPIN_LOCKS
Implementation supports the Spin Locks option.
_POSIX_SPORADIC_SERVER
Implementation supports the Process Sporadic Server option.
_POSIX_SYNCHRONIZED_IO
Implementation supports the Synchronized Input and Output option.
_POSIX_THREAD_ATTR_STACKADDR
Implementation supports the thread stack address attribute option.
_POSIX_THREAD_ATTR_STACKSIZE
Implementation supports the thread stack size attribute option.
_POSIX_THREAD_CPUTIME
Implementation supports the Thread CPU-Time Clocks option.
_POSIX_THREAD_PROCESS_SHARED
Implementation supports the process-shared synchronization option.
_POSIX_THREAD_SAFE_FUNCTIONS
Implementation supports the thread-safe functions option.
_POSIX_THREAD_SPORADIC_SERVER
Implementation supports the Thread Sporadic Server option.
_POSIX_THREADS
Implementation supports the threads option.
_POSIX_TIMERS
Implementation supports the Timers option.
_POSIX_TIMEOUTS
Implementation supports the Timeouts option.
_POSIX_TRACE
Implementation supports the Trace option.
_POSIX_TRACE_EVENT_FILTER
Implementation supports the Trace Event Filter option.
_POSIX_TRACE_INHERIT
Implementation supports the Trace Inherit option.
_POSIX_TRACE_LOG
Implementation supports the Trace Log option.
_POSIX_TYPED_MEMORY_OBJECTS
Implementation supports the Typed Memory Objects option.
_POSIX_V6_ILP32_OFF32
Implementation provides a C-language compilation environment with
32-bit int, long, and pointer types and an off_t type using at
least 64 bits.
_POSIX_V6_ILP32_OFFBIG
Implementation provides a C-language compilation environment with
32-bit int, long, and pointer types and an off_t type using at
least 64 bits.
_POSIX_V6_LP64_OFF64
Implementation provides a C-language compilation environment with
32-bit int and 64-bit long, pointer, and off_t types.
_POSIX_V6_LPBIG_OFFBIG
Implementation provides a C-language compilation environment with
an int type using at least 32 bits and long, pointer, and off_t
types using at least 64 bits.
_POSIX_XOPEN_STREAMS
Implementation supports the XSI STREAMS Option Group.
_POSIX2_C_BIND
Implementation supports the C Language Binding option.
_POSIX2_C_DEV
Implementation supports the C Language Development Utilities op‐
tion.
_POSIX2_CHAR_TERM
Implementation supports at least one terminal type.
_POSIX2_LOCALEDEF
Implementation supports the creation of locales by the localedef(1)
utility.
_POSIX2_PBS
Implementation supports the Batch Environment Services and Utili‐
ties option.
_POSIX2_PBS_ACCOUNTING
Implementation supports the Batch Accounting option.
_POSIX2_PBS_CHECKPOINT
Implementation supports the Batch Checkpoint/Restart option.
_POSIX2_PBS_LOCATE
Implementation supports the Locate Batch Job Request option.
_POSIX2_PBS_MESSAGE
Implementation supports the Batch Job Message Request option.
_POSIX2_PBS_TRACK
Implementation supports the Track Batch Job Request option.
_POSIX2_SW_DEV
Implementation supports the Software Development Utilities option.
_POSIX2_UPE
Implementation supports the User Portability Utilities option.
_XBS5_ILP32_OFF32
Implementation provides a C-language compilation environment with
32-bit int, long, pointer and off_t types.
_XBS5_ILP32_OFFBIG
Implementation provides a C-language compilation environment with
32-bit int, long and pointer types and an off_t type using at least
64 bits.
_XBS5_LP64_OFF64
Implementation provides a C-language compilation environment with
32-bit int and 64-bit long, pointer and off_t types.
_XBS5_LPBIG_OFFBIG
Implementation provides a C-language compilation environment with
an int type using at least 32 bits and long, pointer and off_t
types using at least 64 bits.
_XOPEN_ENH_I18N
Implementation supports the Issue 4, Version 2 Enhanced Interna‐
tionalization Feature Group.
_XOPEN_LEGACY
Implementation supports the Legacy Feature Group.
_XOPEN_REALTIME
Implementation supports the X/Open Realtime Feature Group.
_XOPEN_SHM
Implementation supports the Issue 4, Version 2 Shared Memory Fea‐
ture Group.
_XOPEN_UNIX
X/Open CAE Specification, January 1997, System Interfaces and Head‐
ers, Issue 5 (ISBN: 1-85912-181-0, C606).
_XOPEN_XPG3
X/Open Specification, February 1992, System Interfaces and Headers,
Issue 3 (ISBN: 1-872630-37-5, C212); this specification was for‐
merly X/Open Portability Guide, Issue 3, Volume 2, January 1989,
XSI System Interface and Headers (ISBN: 0-13-685843-0,
XO/XPG/89/003).
_XOPEN_XPG4
X/Open CAE Specification, July 1992, System Interfaces and Headers,
Issue 4 (ISBN: 1-872630-47-2, C202).
Execution-time Symbolic Constants
If any of the following constants are not defined in the header
<unistd.h>, the value varies depending on the file to which it is ap‐
plied.
If any of the following constants are defined to have value −1 in the
header <unistd.h>, the implementation will not provide the option on
any file; if any are defined to have a value other than −1 in the
header <unistd.h>, the implementation will provide the option on all
applicable files.
All of the following constants, whether defined in <unistd.h> or not,
can be queried with respect to a specific file using the pathconf() or
fpathconf() functions.
_POSIX_ASYNC_IO Asynchronous input or output operations can be per‐
formed for the associated file.
_POSIX_PRIO_IO Prioritized input or output operations can be per‐
formed for the associated file.
_POSIX_SYNC_IO Synchronized input or output operations can be per‐
formed for the associated file.
Constants for Functions
The following constant is defined:
NULL Null pointer.
The following symbolic constants are defined for the access(2) family
of functions:
R_OK Test for read permission.
W_OK Test for write permission.
X_OK Test for execute (search) permission.
F_OK Test for existence of file.
The constants F_OK, R_OK, W_OK, and X_OK, and the expressions
R_OK|W_OK, R_OK|X_OK, and R_OK|W_OK|X_OK all have distinct values.
The following symbolic constants are defined for the lockf(3C) func‐
tion:
F_ULOCK Unlock a previously locked region.
F_LOCK Lock a region for exclusive use.
F_TLOCK Test and lock a region for exclusive use.
F_TEST Test a region for other processes locks.
The following symbolic constants are defined for the lseek(2) and fc‐
ntl(2) functions (they have distinct values):
SEEK_SET Set file offset to offset.
SEEK_CUR Set file offset to current plus offset.
SEEK_END Set file offset to EOF plus offset.
The following symbolic constants are defined for the confstr(3C) func‐
tion:
tab(); lw(2.75i) lw(2.75i) _CS_LFS_CFLAGS_CS_LFS_LDFLAGS
_CS_LFS_LIBS_CS_LFS_LINTFLAGS _CS_LFS64_CFLAGS_CS_LFS64_LDFLAGS
_CS_LFS64_LIBS_CS_LFS64_LINTFLAGS
_CS_PATH_CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_LD‐
FLAGS_CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LINT‐
FLAGS_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LD‐
FLAGS_CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LINT‐
FLAGS_CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_LD‐
FLAGS_CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LINT‐
FLAGS_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LD‐
FLAGS_CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LINT‐
F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_XBS5_LPBIG_OFFBIG_LINTFLAGS
The following symbolic constants are defined for the sysconf(3C) func‐
tion:
tab(); lw(2.75i) lw(2.75i) _SC_2_C_BIND_SC_2_C_DEV _SC_2_C_VER‐
SION_SC_2_CHAR_TERM _SC_2_FORT_DEV_SC_2_FORT_RUN _SC_2_LO‐
CALEDEF_SC_2_PBS _SC_2_PBS_ACCOUNTING_SC_2_PBS_CHECKPOINT _SC_2_PBS_LO‐
CATE_SC_2_PBS_MESSAGE _SC_2_PBS_TRACK_SC_2_SW_DEV _SC_2_UPE_SC_2_VER‐
SION _SC_ADI_METADATA_MAX_SC_ADVISORY_INFO _SC_AIO_LIS‐
TIO_MAX_SC_AIO_MAX _SC_AIO_PRIO_DELTA_MAX_SC_AIO_VERSION
_SC_ARG_MAX_SC_ASYNCHRONOUS_IO _SC_ATEXIT_MAX_SC_AVPHYS_PAGES _SC_BAR‐
RIERS_SC_BC_BASE_MAX _SC_BC_DIM_MAX_SC_BC_SCALE_MAX
_SC_BC_STRING_MAX_SC_CHILD_MAX _SC_CLK_TCK_SC_CLOCK_SELECTION _SC_CO‐
HER_BLKSZ_SC_COLL_WEIGHTS_MAX _SC_CPUID_MAX_SC_CPUID_SEQ_MAX
_SC_CPUTIME_SC_DCACHE_ASSOC _SC_DCACHE_BLKSZ_SC_DCACHE_LINESZ
_SC_DCACHE_SZ_SC_DCACHE_TBLKSZ _SC_DELAYTIMER_MAX_SC_DEVT_VERSION
_SC_EPHID_MAX_SC_EXPR_NEST_MAX _SC_FSYNC_SC_GETGR_R_SIZE_MAX
_SC_GETPW_R_SIZE_MAX_SC_HOST_NAME_MAX _SC_ICACHE_ASSOC_SC_ICACHE_BLKSZ
_SC_ICACHE_LINESZ_SC_ICACHE_SZ _SC_IOV_MAX_SC_IPV6 _SC_JOB_CON‐
TROL_SC_L2CACHE_ASSOC _SC_L2CACHE_LINESZ_SC_L2CACHE_SZ _SC_L3CACHE_AS‐
SOC_SC_L3CACHE_LINESZ _SC_L3CACHE_SZ_SC_LINE_MAX _SC_LO‐
GIN_NAME_MAX_SC_LOGNAME_MAX _SC_MAPPED_FILES_SC_MAX_CONCURRENCY
_SC_MAXPID_SC_MC_VERSION _SC_MEMLOCK_SC_MEMLOCK_RANGE _SC_MEMORY_PRO‐
TECTION_SC_MEMTYPE_VERSION _SC_MESSAGE_PASSING_SC_MONOTONIC_CLOCK
_SC_MQ_OPEN_MAX_SC_MQ_PRIO_MAX _SC_MRP_VERSION_SC_NGROUPS_MAX
_SC_NPROCESSORS_CONF_SC_NPROCESSORS_MAX _SC_NPROCES‐
SORS_ONLN_SC_OPEN_MAX _SC_OSM_PAGESIZE_MIN_SC_OSM_VERSION
_SC_PAGE_SIZE_SC_PAGESIZE _SC_PASS_MAX_SC_PHYS_PAGES _SC_PRIORI‐
TIZED_IO_SC_PRIORITY_SCHEDULING _SC_RAW_SOCKETS_SC_RCTL_VAL_MAX_NUM
_SC_RE_DUP_MAX_SC_READER_WRITER_LOCKS _SC_REALTIME_SIGNALS_SC_REGEXP
_SC_RTSIG_MAX_SC_SAVED_IDS _SC_SEM_NSEMS_MAX_SC_SEM_VALUE_MAX _SC_SEMA‐
PHORES_SC_SHARED_MEMORY_OBJECTS _SC_SHELL_SC_SIGQUEUE_MAX
_SC_SIGRT_MAX_SC_SIGRT_MIN _SC_SPAWN_SC_SPIN_LOCKS
_SC_SPLIT_CACHE_SC_SPORADIC_SERVER _SC_SS_REPL_MAX_SC_STACK_PROT
_SC_STREAM_MAX_SC_SYMLOOP_MAX _SC_SYNCHRONIZED_IO_SC_T_IOV_MAX
_SC_THREAD_ATTR_STACKADDR_SC_THREAD_ATTR_STACKSIZE
_SC_THREAD_CPUTIME_SC_THREAD_DESTRUCTOR_ITERATIONS
_SC_THREAD_KEYS_MAX_SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_PRO‐
TECT_SC_THREAD_PRIORITY_SCHEDULING
_SC_THREAD_PROCESS_SHARED_SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_RO‐
BUST_PRIO_PROTECT_SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SPO‐
RADIC_SERVER_SC_THREAD_STACK_MIN _SC_THREAD_THREADS_MAX_SC_THREADS
_SC_TIMEOUTS_SC_TIMER_MAX _SC_TIMERS_SC_TRACE _SC_TRACE_EVENT_FIL‐
TER_SC_TRACE_EVENT_NAME_MAX _SC_TRACE_INHERIT_SC_TRACE_LOG
_SC_TRACE_NAME_MAX_SC_TRACE_SYS_MAX
_SC_TRACE_USER_EVENT_MAX_SC_TTY_NAME_MAX _SC_TYPED_MEMORY_OB‐
JECTS_SC_TZNAME_MAX _SC_V6_ILP32_OFF32_SC_V6_ILP32_OFFBIG
_SC_V6_LP64_OFF64_SC_V6_LPBIG_OFFBIG
_SC_V7_ILP32_OFF32_SC_V7_ILP32_OFFBIG _SC_V7_LP64_OFF64_SC_V7_LP‐
BIG_OFFBIG _SC_VERSION_SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF‐
BIG_SC_XBS5_LP64_OFF64 _SC_XBS5_LPBIG_OFFBIG_SC_XOPEN_ARMOR
_SC_XOPEN_CRYPT_SC_XOPEN_ENH_I18N _SC_XOPEN_LEGACY_SC_XOPEN_REALTIME
_SC_XOPEN_REALTIME_THREADS_SC_XOPEN_SHM _SC_XOPEN_STREAMS_SC_XOPEN_UNIX
_SC_XOPEN_UUCP_SC_XOPEN_VERSION _SC_XOPEN_XCU_VERSION
The constants _SC_PAGESIZE and _SC_PAGE_SIZE can be defined to have the
same value.
The following symbolic constants are defined for the fpathconf(2) func‐
tion:
tab(); lw(2.75i) lw(2.75i) _PC_2_SYMLINKS_PC_ACCESS_FILTERING
_PC_ACL_ENABLED_PC_ALLOC_SIZE_MIN _PC_ASYNC_IO_PC_CASE_BEHAVIOR
_PC_CHOWN_RESTRICTED_PC_FILESIZEBITS _PC_LAST_PC_LINK_MAX
_PC_MAX_CANON_PC_MAX_INPUT _PC_MIN_HOLE_SIZE_PC_NAME_MAX
_PC_NO_TRUNC_PC_PATH_MAX _PC_PIPE_BUF_PC_PRIO_IO
_PC_REC_INCR_XFER_SIZE_PC_REC_MAX_XFER_SIZE
_PC_REC_MIN_XFER_SIZE_PC_REC_XFER_ALIGN _PC_REFLINK_EN‐
ABLED_PC_SATTR_ENABLED _PC_SATTR_EXISTS_PC_SYMLINK_MAX
_PC_SYNC_IO_PC_TIMESTAMP_RESOLUTION _PC_VDISABLE_PC_XATTR_ENABLED
_PC_XATTR_EXISTS
The following symbolic constants are defined for file streams:
STDIN_FILENO File number (0) of stdin.
STDOUT_FILENO File number (1) of stout.
STDERR_FILENO File number (2) of stderr.
The following pathnames are defined:
GF_PATH Pathname of the group file.
PF_PATH Pathname of the passwd file.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ StandardSee stan‐
dards(7).
SEE ALSO
access(2), exec(2), fcntl(2), fpathconf(2), lseek(2), confstr(3C),
lockf(3C), sysconf(3C), termios(3C), termio(4I), group(5), passwd(5),
attributes(7), standards(7)
Oracle Solaris 11.4 30 Aug 2024 unistd.h(3HEAD)