1POSIXOPTIONS(7)            Linux Programmer's Manual           POSIXOPTIONS(7)
2
3
4

NAME

6       posixoptions - optional parts of the POSIX standard
7

DESCRIPTION

9       The  POSIX  standard  (the  information  below  is  from  POSIX.1-2001)
10       describes a set of behaviors and interfaces  for  a  compliant  system.
11       However, many interfaces are optional and there are feature test macros
12       to test the availability of interfaces at compile time,  and  functions
13       sysconf(3),  fpathconf(3),  pathconf(3),  confstr(3)  to do this at run
14       time.  From shell scripts one can use getconf(1).  For more detail, see
15       sysconf(3).
16
17       We give the name of the POSIX abbreviation, the option, the name of the
18       sysconf(3) parameter used to inquire about the option, and  possibly  a
19       very  short  description.  Much more precise detail can be found in the
20       POSIX standard itself, versions  of  which  can  nowadays  be  accessed
21       freely on the web.
22
23   ADV - _POSIX_ADVISORY_INFO - _SC_ADVISORY_INFO
24       The following advisory functions are present:
25
26           posix_fadvise(),
27           posix_fallocate(),
28           posix_memalign(),
29           posix_madvise().
30
31   AIO - _POSIX_ASYNCHRONOUS_IO - _SC_ASYNCHRONOUS_IO
32       The header <aio.h> is present.  The following functions are present:
33
34           aio_cancel(),
35           aio_error(),
36           aio_fsync(),
37           aio_read(),
38           aio_return(),
39           aio_suspend(),
40           aio_write(),
41           lio_listio().
42
43   BAR - _POSIX_BARRIERS - _SC_BARRIERS
44       This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
45       options.  The following functions are present:
46
47           pthread_barrier_destroy(),
48           pthread_barrier_init(),
49           pthread_barrier_wait(),
50           pthread_barrierattr_destroy(),
51           pthread_barrierattr_init().
52
53   --- - POSIX_CHOWN_RESTRICTED
54       If this option is in effect (as it always is under POSIX.1-2001),  then
55       only root may change the owner of a file, and nonroot can set the group
56       of a file only to one of the groups it belongs to.   This  affects  the
57       functions chown(), fchown().
58
59   CS - _POSIX_CLOCK_SELECTION - _SC_CLOCK_SELECTION
60       This  option implies the _POSIX_TIMERS option.  The following functions
61       are present:
62
63           pthread_condattr_getclock(),
64           pthread_condattr_setclock(),
65           clock_nanosleep().
66
67       If CLOCK_REALTIME is changed by the function clock_settime(), then this
68       affects all timers set for an absolute time.
69
70   CPT - _POSIX_CPUTIME - _SC_CPUTIME
71       The  clockID  CLOCK_PROCESS_CPUTIME_ID is supported.  The initial value
72       of this  clock  is  0  for  each  process.   This  option  implies  the
73       _POSIX_TIMERS option.  The function clock_getcpuclockid() is present.
74
75   --- - _POSIX_FILE_LOCKING - _SC_FILE_LOCKING
76       This option has been deleted.  Not in final XPG6.
77
78   FSC - _POSIX_FSYNC - _SC_FSYNC
79       The function fsync() is present.
80
81   IP6 - _POSIX_IPV6 - _SC_IPV6
82       Internet Protocol Version 6 is supported.
83
84   --- - _POSIX_JOB_CONTROL - _SC_JOB_CONTROL
85       If  this option is in effect (as it always is under POSIX.1-2001), then
86       the system implements POSIX-style job control, and the following  func‐
87       tions are present:
88
89           setpgid(),
90           tcdrain(),
91           tcflush(),
92           tcgetpgrp(),
93           tcsendbreak(),
94           tcsetattr(),
95           tcsetpgrp().
96
97   MF - _POSIX_MAPPED_FILES - _SC_MAPPED_FILES
98       Shared  memory is supported.  The include file <sys/mman.h> is present.
99       The following functions are present: mmap(), msync(), munmap().
100
101   ML - _POSIX_MEMLOCK - _SC_MEMLOCK
102       Shared memory can be  locked  into  core.   The  functions  mlockall(),
103       munlockall() are present.
104
105   MR/MLR - _POSIX_MEMLOCK_RANGE - _SC_MEMLOCK_RANGE
106       More precisely, ranges can be locked into core.  The functions mlock(),
107       munlock() are present.
108
109   MPR - _POSIX_MEMORY_PROTECTION - _SC_MEMORY_PROTECTION
110       The function mprotect() is present.
111
112   MSG - _POSIX_MESSAGE_PASSING - _SC_MESSAGE_PASSING
113       The include file <mqueue.h> is present.  The  following  functions  are
114       present:
115
116           mq_close(),
117           mq_getattr(),
118           mq_notify(),
119           mq_open(),
120           mq_receive(),
121           mq_send(),
122           mq_setattr(),
123           mq_unlink().
124
125   MON - _POSIX_MONOTONIC_CLOCK - _SC_MONOTONIC_CLOCK
126       CLOCK_MONOTONIC  is  supported.   This option implies the _POSIX_TIMERS
127       option.  Affected functions are
128
129           aio_suspend(),
130           clock_getres(),
131           clock_gettime(),
132           clock_settime(),
133           timer_create().
134
135   --- - _POSIX_MULTI_PROCESS - _SC_MULTI_PROCESS
136       This option has been deleted.  Not in final XPG6.
137
138   --- - _POSIX_NO_TRUNC
139       If this option is in effect (as it always is under  POSIX.1-2001)  then
140       pathname components longer than NAME_MAX are not truncated, but give an
141       error.  This property may be dependent on the path prefix of the compo‐
142       nent.
143
144   PIO - _POSIX_PRIORITIZED_IO - _SC_PRIORITIZED_IO
145       This  option says that one can specify priorities for asynchronous I/O.
146       This affects the functions
147
148           aio_read(),
149           aio_write().
150
151   PS - _POSIX_PRIORITY_SCHEDULING - _SC_PRIORITY_SCHEDULING
152       The include file <sched.h> is present.   The  following  functions  are
153       present:
154
155           sched_get_priority_max(),
156           sched_get_priority_min(),
157           sched_getparam(),
158           sched_getscheduler(),
159           sched_rr_get_interval(),
160           sched_setparam(),
161           sched_setscheduler(),
162           sched_yield().
163       If  also  _POSIX_SPAWN  is  in effect, then the following functions are
164       present:
165
166           posix_spawnattr_getschedparam(),
167           posix_spawnattr_getschedpolicy(),
168           posix_spawnattr_setschedparam(),
169           posix_spawnattr_setschedpolicy().
170
171   RS - _POSIX_RAW_SOCKETS
172       Raw sockets are supported.  Affected functions are  getsockopt(),  set‐
173       sockopt().
174
175   --- - _POSIX_READER_WRITER_LOCKS - _SC_READER_WRITER_LOCKS
176       This  option  implies  the  _POSIX_THREADS  option.   Conversely, under
177       POSIX.1-2001 the _POSIX_THREADS option implies this option.
178
179       The following functions are present:
180           pthread_rwlock_destroy(),
181           pthread_rwlock_init(),
182           pthread_rwlock_rdlock(),
183           pthread_rwlock_tryrdlock(),
184           pthread_rwlock_trywrlock(),
185           pthread_rwlock_unlock(),
186           pthread_rwlock_wrlock(),
187           pthread_rwlockattr_destroy(),
188           pthread_rwlockattr_init().
189
190   RTS - _POSIX_REALTIME_SIGNALS - _SC_REALTIME_SIGNALS
191       Realtime signals are supported.  The following functions are present:
192
193           sigqueue(),
194           sigtimedwait(),
195           sigwaitinfo().
196
197   --- - _POSIX_REGEXP - _SC_REGEXP
198       If this option is in effect (as it always is under  POSIX.1-2001)  then
199       POSIX regular expressions are supported and the following functions are
200       present:
201
202           regcomp(),
203           regerror(),
204           regexec(),
205           regfree().
206
207   --- - _POSIX_SAVED_IDS - _SC_SAVED_IDS
208       If this option is in effect (as it always is under POSIX.1-2001),  then
209       a  process  has a saved set-user-ID and a saved set-group-ID.  Affected
210       functions are
211
212           exec(),
213           kill(),
214           seteuid(),
215           setegid(),
216           setgid(),
217           setuid().
218
219   SEM - _POSIX_SEMAPHORES - _SC_SEMAPHORES
220       The include file <semaphore.h> is present.  The following functions are
221       present:
222
223           sem_close(),
224           sem_destroy(),
225           sem_getvalue(),
226           sem_init(),
227           sem_open(),
228           sem_post(),
229           sem_trywait(),
230           sem_unlink(),
231           sem_wait().
232
233   SHM - _POSIX_SHARED_MEMORY_OBJECTS - _SC_SHARED_MEMORY_OBJECTS
234       The following functions are present:
235
236           mmap(),
237           munmap(),
238           shm_open(),
239           shm_unlink().
240
241   --- - _POSIX_SHELL - _SC_SHELL
242       If  this  option is in effect (as it always is under POSIX.1-2001), the
243       function system() is present.
244
245   SPN - _POSIX_SPAWN - _SC_SPAWN
246       This option describes support for process creation in a  context  where
247       it  is  difficult  or impossible to use fork(), for example, because no
248       MMU is present.  If _POSIX_SPAWN is in effect, then  the  include  file
249       <spawn.h> and the following functions are present:
250
251           posix_spawn(),
252           posix_spawn_file_actions_addclose(),
253           posix_spawn_file_actions_adddup2(),
254           posix_spawn_file_actions_addopen(),
255           posix_spawn_file_actions_destroy(),
256           posix_spawn_file_actions_init(),
257           posix_spawnattr_destroy(),
258           posix_spawnattr_getsigdefault(),
259           posix_spawnattr_getflags(),
260           posix_spawnattr_getpgroup(),
261           posix_spawnattr_getsigmask(),
262           posix_spawnattr_init(),
263           posix_spawnattr_setsigdefault(),
264           posix_spawnattr_setflags(),
265           posix_spawnattr_setpgroup(),
266           posix_spawnattr_setsigmask(),
267           posix_spawnp().
268       If  also  _POSIX_PRIORITY_SCHEDULING  is  in effect, then the following
269       functions are present:
270
271           posix_spawnattr_getschedparam(),
272           posix_spawnattr_getschedpolicy(),
273           posix_spawnattr_setschedparam(),
274           posix_spawnattr_setschedpolicy().
275
276   SPI - _POSIX_SPIN_LOCKS - _SC_SPIN_LOCKS
277       This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
278       options.  The following functions are present:
279
280           pthread_spin_destroy(),
281           pthread_spin_init(),
282           pthread_spin_lock(),
283           pthread_spin_trylock(),
284           pthread_spin_unlock().
285
286   SS - _POSIX_SPORADIC_SERVER - _SC_SPORADIC_SERVER
287       The scheduling policy SCHED_SPORADIC is supported.  This option implies
288       the _POSIX_PRIORITY_SCHEDULING option.  Affected functions are
289
290           sched_setparam(),
291           sched_setscheduler().
292
293   SIO - _POSIX_SYNCHRONIZED_IO - _SC_SYNCHRONIZED_IO
294       Affected functions are open(), msync(), fsync(), fdatasync().
295
296   TSA - _POSIX_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKADDR
297       Affected functions are
298
299           pthread_attr_getstack(),
300           pthread_attr_getstackaddr(),
301           pthread_attr_setstack(),
302           pthread_attr_setstackaddr().
303
304   TSS - _POSIX_THREAD_ATTR_STACKSIZE - _SC_THREAD_ATTR_STACKSIZE
305       Affected functions are
306
307           pthread_attr_getstack(),
308           pthread_attr_getstacksize(),
309           pthread_attr_setstack(),
310           pthread_attr_setstacksize().
311
312   TCT - _POSIX_THREAD_CPUTIME - _SC_THREAD_CPUTIME
313       The clockID CLOCK_THREAD_CPUTIME_ID is supported.  This option  implies
314       the _POSIX_TIMERS option.  Affected functions are
315
316           pthread_getcpuclockid(),
317           clock_getres(),
318           clock_gettime(),
319           clock_settime(),
320           timer_create().
321
322   TPI - _POSIX_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_INHERIT
323       Affected functions are
324
325           pthread_mutexattr_getprotocol(),
326           pthread_mutexattr_setprotocol().
327
328   TPP - _POSIX_THREAD_PRIO_PROTECT - _SC_THREAD_PRIO_PROTECT
329       Affected functions are
330
331           pthread_mutex_getprioceiling(),
332           pthread_mutex_setprioceiling(),
333           pthread_mutexattr_getprioceiling(),
334           pthread_mutexattr_getprotocol(),
335           pthread_mutexattr_setprioceiling(),
336           pthread_mutexattr_setprotocol().
337
338   TPS - _POSIX_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIORITY_SCHEDULING
339       If this option is in effect, the different threads inside a process can
340       run with different priorities and/or  different  schedulers.   Affected
341       functions are
342
343           pthread_attr_getinheritsched(),
344           pthread_attr_getschedpolicy(),
345           pthread_attr_getscope(),
346           pthread_attr_setinheritsched(),
347           pthread_attr_setschedpolicy(),
348           pthread_attr_setscope(),
349           pthread_getschedparam(),
350           pthread_setschedparam(),
351           pthread_setschedprio().
352
353   TSH - _POSIX_THREAD_PROCESS_SHARED - _SC_THREAD_PROCESS_SHARED
354       Affected functions are
355
356           pthread_barrierattr_getpshared(),
357           pthread_barrierattr_setpshared(),
358           pthread_condattr_getpshared(),
359           pthread_condattr_setpshared(),
360           pthread_mutexattr_getpshared(),
361           pthread_mutexattr_setpshared(),
362           pthread_rwlockattr_getpshared(),
363           pthread_rwlockattr_setpshared().
364
365   TSF - _POSIX_THREAD_SAFE_FUNCTIONS - _SC_THREAD_SAFE_FUNCTIONS
366       Affected functions are
367
368           readdir_r(),
369           getgrgid_r(),
370           getgrnam_r(),
371           getpwnam_r(),
372           getpwuid_r(),
373           flockfile(),
374           ftrylockfile(),
375           funlockfile(),
376           getc_unlocked(),
377           getchar_unlocked(),
378           putc_unlocked(),
379           putchar_unlocked(),
380           rand_r(),
381           strerror_r(),
382           strtok_r(),
383           asctime_r(),
384           ctime_r(),
385           gmtime_r(),
386           localtime_r().
387
388   TSP - _POSIX_THREAD_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER
389       This   option  implies  the  _POSIX_THREAD_PRIORITY_SCHEDULING  option.
390       Affected functions are
391
392           sched_getparam(),
393           sched_setparam(),
394           sched_setscheduler().
395
396   THR - _POSIX_THREADS - _SC_THREADS
397       Basic support for POSIX threads is available.  The following  functions
398       are present:
399
400           pthread_atfork(),
401           pthread_attr_destroy(),
402           pthread_attr_getdetachstate(),
403           pthread_attr_getschedparam(),
404           pthread_attr_init(),
405           pthread_attr_setdetachstate(),
406           pthread_attr_setschedparam(),
407           pthread_cancel(),
408           pthread_cleanup_push(),
409           pthread_cleanup_pop(),
410           pthread_cond_broadcast(),
411           pthread_cond_destroy(),
412           pthread_cond_init(),
413           pthread_cond_signal(),
414           pthread_cond_timedwait(),
415           pthread_cond_wait(),
416           pthread_condattr_destroy(),
417           pthread_condattr_init(),
418           pthread_create(),
419           pthread_detach(),
420           pthread_equal(),
421           pthread_exit(),
422           pthread_getspecific(),
423           pthread_join(),
424           pthread_key_create(),
425           pthread_key_delete(),
426           pthread_mutex_destroy(),
427           pthread_mutex_init(),
428           pthread_mutex_lock(),
429           pthread_mutex_trylock(),
430           pthread_mutex_unlock(),
431           pthread_mutexattr_destroy(),
432           pthread_mutexattr_init(),
433           pthread_once(),
434           pthread_rwlock_destroy(),
435           pthread_rwlock_init(),
436           pthread_rwlock_rdlock(),
437           pthread_rwlock_tryrdlock(),
438           pthread_rwlock_trywrlock(),
439           pthread_rwlock_unlock(),
440           pthread_rwlock_wrlock(),
441           pthread_rwlockattr_destroy(),
442           pthread_rwlockattr_init(),
443           pthread_self(),
444           pthread_setcancelstate(),
445           pthread_setcanceltype(),
446           pthread_setspecific(),
447           pthread_testcancel().
448
449   TMO - _POSIX_TIMEOUTS - _SC_TIMEOUTS
450       The following functions are present:
451
452           mq_timedreceive(),
453           mq_timedsend(),
454           pthread_mutex_timedlock(),
455           pthread_rwlock_timedrdlock(),
456           pthread_rwlock_timedwrlock(),
457           sem_timedwait(),
458           posix_trace_timedgetnext_event().
459
460   TMR - _POSIX_TIMERS - _SC_TIMERS
461       The following functions are present:
462
463           clock_getres(),
464           clock_gettime(),
465           clock_settime(),
466           nanosleep(),
467           timer_create(),
468           timer_delete(),
469           timer_gettime(),
470           timer_getoverrun(),
471           timer_settime().
472
473   TRC - _POSIX_TRACE - _SC_TRACE
474       POSIX tracing is available.  The following functions are present:
475
476           posix_trace_attr_destroy(),
477           posix_trace_attr_getclockres(),
478           posix_trace_attr_getcreatetime(),
479           posix_trace_attr_getgenversion(),
480           posix_trace_attr_getmaxdatasize(),
481           posix_trace_attr_getmaxsystemeventsize(),
482           posix_trace_attr_getmaxusereventsize(),
483           posix_trace_attr_getname(),
484           posix_trace_attr_getstreamfullpolicy(),
485           posix_trace_attr_getstreamsize(),
486           posix_trace_attr_init(),
487           posix_trace_attr_setmaxdatasize(),
488           posix_trace_attr_setname(),
489           posix_trace_attr_setstreamsize(),
490           posix_trace_attr_setstreamfullpolicy(),
491           posix_trace_clear(),
492           posix_trace_create(),
493           posix_trace_event(),
494           posix_trace_eventid_equal(),
495           posix_trace_eventid_get_name(),
496           posix_trace_eventid_open(),
497           posix_trace_eventtypelist_getnext_id(),
498           posix_trace_eventtypelist_rewind(),
499           posix_trace_flush(),
500           posix_trace_get_attr(),
501           posix_trace_get_status(),
502           posix_trace_getnext_event(),
503           posix_trace_shutdown(),
504           posix_trace_start(),
505           posix_trace_stop(),
506           posix_trace_trygetnext_event().
507
508   TEF - _POSIX_TRACE_EVENT_FILTER - _SC_TRACE_EVENT_FILTER
509       This  option  implies the _POSIX_TRACE option.  The following functions
510       are present:
511
512           posix_trace_eventset_add(),
513           posix_trace_eventset_del(),
514           posix_trace_eventset_empty(),
515           posix_trace_eventset_fill(),
516           posix_trace_eventset_ismember(),
517           posix_trace_get_filter(),
518           posix_trace_set_filter(),
519           posix_trace_trid_eventid_open().
520
521   TRI - _POSIX_TRACE_INHERIT - _SC_TRACE_INHERIT
522       Tracing children of the  traced  process  is  supported.   This  option
523       implies the _POSIX_TRACE option.  The following functions are present:
524
525           posix_trace_attr_getinherited(),
526           posix_trace_attr_setinherited().
527
528   TRL - _POSIX_TRACE_LOG - _SC_TRACE_LOG
529       This  option  implies the _POSIX_TRACE option.  The following functions
530       are present:
531
532           posix_trace_attr_getlogfullpolicy(),
533           posix_trace_attr_getlogsize(),
534           posix_trace_attr_setlogfullpolicy(),
535           posix_trace_attr_setlogsize(),
536           posix_trace_close(),
537           posix_trace_create_withlog(),
538           posix_trace_open(),
539           posix_trace_rewind().
540
541   TYM - _POSIX_TYPED_MEMORY_OBJECTS - _SC_TYPED_MEMORY_OBJECT
542       The following functions are present:
543
544           posix_mem_offset(),
545           posix_typed_mem_get_info(),
546           posix_typed_mem_open().
547
548   --- - _POSIX_VDISABLE
549       Always present (probably 0).  Value to set a changeable special control
550       character to indicate that it is disabled.
551

XOPEN EXTENSIONS

553       _XOPEN_CRYPT,  _XOPEN_LEGACY, _XOPEN_REALTIME, _XOPEN_REALTIME_THREADS,
554       _XOPEN_UNIX.
555

SEE ALSO

557       sysconf(3), standards(7)
558

COLOPHON

560       This page is part of release 4.15 of the Linux  man-pages  project.   A
561       description  of  the project, information about reporting bugs, and the
562       latest    version    of    this    page,    can     be     found     at
563       https://www.kernel.org/doc/man-pages/.
564
565
566
567                                  2007-12-21                   POSIXOPTIONS(7)
Impressum