1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .TH POSIXOPTIONS 7 2003-08-24 "POSIX" "Linux Programmer's Manual"
25 posixoptions \- optional parts of the POSIX standard
27 The POSIX standard (the information below is from POSIX.1-2001)
28 describes a set of behaviours and interfaces for a compliant system.
29 However, many interfaces are optional and there are feature test macros
30 to test the availability of interfaces at compile time, and functions
35 to do this at run time. From shell scripts one can use
40 We give the name of the POSIX abbreviation, the option, the name of the
42 parameter used to inquire about the option, and possibly
43 a very short description.
44 Much more precise detail can be found in the POSIX standard itself,
45 versions of which can nowadays be accessed freely on the web.
46 .SS "ADV - _POSIX_ADVISORY_INFO - _SC_ADVISORY_INFO"
47 The advisory functions
52 .IR posix_fallocate (),
53 .IR posix_memalign (),
59 .SS "AIO - _POSIX_ASYNCHRONOUS_IO - _SC_ASYNCHRONOUS_IO"
79 .SS "BAR - _POSIX_BARRIERS - _SC_BARRIERS"
80 This option implies the _POSIX_THREADS and
81 _POSIX_THREAD_SAFE_FUNCTIONS options.
86 .IR pthread_barrier_destroy (),
87 .IR pthread_barrier_init (),
88 .IR pthread_barrier_wait (),
89 .IR pthread_barrierattr_destroy (),
90 .IR pthread_barrierattr_init ()
96 .\" Batch environment.
99 .SS "--- - POSIX_CHOWN_RESTRICTED"
100 If this option is in effect (as it always is under POSIX.1-2001)
101 then only root may change the owner of a file, and non-root can only
102 set the group of a file to one of the groups it belongs to.
103 This affects the functions
106 .\" What about lchown() ?
107 .SS "CS - _POSIX_CLOCK_SELECTION - _SC_CLOCK_SELECTION"
108 This option implies the _POSIX_TIMERS option.
113 .IR pthread_condattr_getclock (),
114 .IR pthread_condattr_setclock (),
115 .IR clock_nanosleep ()
120 If CLOCK_REALTIME is changed by the function
121 .IR clock_settime (),
122 then this affects all timers set for an absolute time.
123 .SS "CPT - _POSIX_CPUTIME - _SC_CPUTIME"
124 The clockID CLOCK_PROCESS_CPUTIME_ID is supported.
125 The initial value of this clock is 0 for each process.
126 This option implies the _POSIX_TIMERS option.
128 .IR clock_getcpuclockid ()
131 .\" Fortran development
134 .SS "--- - _POSIX_FILE_LOCKING - _SC_FILE_LOCKING"
135 This option has been deleted. Not in final XPG6.
136 .SS "FSC - _POSIX_FSYNC - _SC_FSYNC "
140 .SS "IP6 - _POSIX_IPV6 - _SC_IPV6"
141 Internet Protocol Version 6 is supported.
142 .SS "--- - _POSIX_JOB_CONTROL - _SC_JOB_CONTROL"
143 If this option is in effect (as it always is under POSIX.1-2001)
144 then the system implements POSIX-style job control, and the functions
158 .SS "MF - _POSIX_MAPPED_FILES - _SC_MAPPED_FILES"
159 Shared memory is supported. The include file
161 is present. The functions
166 .SS "ML - _POSIX_MEMLOCK - _SC_MEMLOCK"
167 Shared memory can be locked into core. The functions
171 .SS "MR/MLR - _POSIX_MEMLOCK_RANGE - _SC_MEMLOCK_RANGE"
172 More precisely, ranges can be locked into core. The functions
176 .SS "MPR - _POSIX_MEMORY_PROTECTION - _SC_MEMORY_PROTECTION"
180 .SS "MSG - _POSIX_MESSAGE_PASSING - _SC_MESSAGE_PASSING"
183 is present. The functions
199 .SS "MON - _POSIX_MONOTONIC_CLOCK - _SC_MONOTONIC_CLOCK"
201 CLOCK_MONOTONIC is supported.
202 This option implies the _POSIX_TIMERS option.
203 Affected functions are
207 .IR clock_gettime (),
208 .IR clock_settime (),
212 .SS "--- - _POSIX_MULTI_PROCESS - _SC_MULTI_PROCESS"
213 This option has been deleted. Not in final XPG6.
215 .\" IEC 60559 Floating-Point Option.
216 .SS "--- - _POSIX_NO_TRUNC"
217 If this option is in effect (as it always is under POSIX.1-2001)
218 then pathname components longer than NAME_MAX are not truncated,
220 This property may be dependent on the path prefix of the component.
221 .SS "PIO - _POSIX_PRIORITIZED_IO - _SC_PRIORITIZED_IO"
222 This option says that one can specify priorities for asynchronous I/O.
223 This affects the functions
231 .SS "PS - _POSIX_PRIORITY_SCHEDULING - _SC_PRIORITY_SCHEDULING"
234 is present. The functions
238 .IR sched_get_priority_max (),
239 .IR sched_get_priority_min (),
240 .IR sched_getparam (),
241 .IR sched_getscheduler (),
242 .IR sched_rr_get_interval (),
243 .IR sched_setparam (),
244 .IR sched_setscheduler (),
250 If also _POSIX_SPAWN is in effect, then the functions
254 .IR posix_spawnattr_getschedparam (),
255 .IR posix_spawnattr_getschedpolicy (),
256 .IR posix_spawnattr_setschedparam (),
257 .IR posix_spawnattr_setschedpolicy ()
261 .SS "RS - _POSIX_RAW_SOCKETS"
262 Raw sockets are supported. Affected functions are
265 .SS "--- - _POSIX_READER_WRITER_LOCKS - _SC_READER_WRITER_LOCKS"
266 This option implies the _POSIX_THREADS option. Conversely,
267 under POSIX.1-2001 the _POSIX_THREADS option implies this option.
271 .IR pthread_rwlock_destroy (),
272 .IR pthread_rwlock_init (),
273 .IR pthread_rwlock_rdlock (),
274 .IR pthread_rwlock_tryrdlock (),
275 .IR pthread_rwlock_trywrlock (),
276 .IR pthread_rwlock_unlock (),
277 .IR pthread_rwlock_wrlock (),
278 .IR pthread_rwlockattr_destroy (),
279 .IR pthread_rwlockattr_init ()
283 .SS "RTS - _POSIX_REALTIME_SIGNALS - _SC_REALTIME_SIGNALS"
284 Realtime signals are supported. The functions
295 .SS "--- - _POSIX_REGEXP - _SC_REGEXP"
296 If this option is in effect (as it always is under POSIX.1-2001)
297 then POSIX regular expressions are supported and the functions
309 .SS "--- - _POSIX_SAVED_IDS - _SC_SAVED_IDS"
310 If this option is in effect (as it always is under POSIX.1-2001)
311 then a process has a saved set-user-ID and a saved set-group-ID.
312 Affected functions are
326 .\" Software development
327 .SS "SEM - _POSIX_SEMAPHORES - _SC_SEMAPHORES"
348 .SS "SHM - _POSIX_SHARED_MEMORY_OBJECTS - _SC_SHARED_MEMORY_OBJECTS"
361 .SS "--- - _POSIX_SHELL - _SC_SHELL"
362 If this option is in effect (as it always is under POSIX.1-2001),
366 .SS "SPN - _POSIX_SPAWN - _SC_SPAWN"
367 This option describes support for process creation in a context where
368 it is difficult or impossible to use
370 e.g. because no MMU is present.
371 If _POSIX_SPAWN is in effect, then the include file
378 .IR posix_spawn_file_actions_addclose (),
379 .IR posix_spawn_file_actions_adddup2 (),
380 .IR posix_spawn_file_actions_addopen (),
381 .IR posix_spawn_file_actions_destroy (),
382 .IR posix_spawn_file_actions_init (),
383 .IR posix_spawnattr_destroy (),
384 .IR posix_spawnattr_getsigdefault (),
385 .IR posix_spawnattr_getflags (),
386 .IR posix_spawnattr_getpgroup (),
387 .IR posix_spawnattr_getsigmask (),
388 .IR posix_spawnattr_init (),
389 .IR posix_spawnattr_setsigdefault (),
390 .IR posix_spawnattr_setflags (),
391 .IR posix_spawnattr_setpgroup (),
392 .IR posix_spawnattr_setsigmask (),
398 If also _POSIX_PRIORITY_SCHEDULING is in effect, then
403 .IR posix_spawnattr_getschedparam (),
404 .IR posix_spawnattr_getschedpolicy (),
405 .IR posix_spawnattr_setschedparam (),
406 .IR posix_spawnattr_setschedpolicy ()
410 .SS "SPI - _POSIX_SPIN_LOCKS - _SC_SPIN_LOCKS"
411 This option implies the _POSIX_THREADS and
412 _POSIX_THREAD_SAFE_FUNCTIONS options.
417 .IR pthread_spin_destroy (),
418 .IR pthread_spin_init (),
419 .IR pthread_spin_lock (),
420 .IR pthread_spin_trylock (),
421 .IR pthread_spin_unlock ()
426 .SS "SS - _POSIX_SPORADIC_SERVER - _SC_SPORADIC_SERVER"
427 The scheduling policy SCHED_SPORADIC is supported.
428 This option implies the _POSIX_PRIORITY_SCHEDULING option.
429 Affected functions are
433 .IR sched_setparam (),
434 .IR sched_setscheduler ().
438 .SS "SIO - _POSIX_SYNCHRONIZED_IO - _SC_SYNCHRONIZED_IO"
439 Affected functions are
444 .SS "TSA - _POSIX_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKADDR"
445 Affected functions are
449 .IR pthread_attr_getstack (),
450 .IR pthread_attr_getstackaddr (),
451 .IR pthread_attr_setstack (),
452 .IR pthread_attr_setstackaddr ().
456 .SS "TSS - _POSIX_THREAD_ATTR_STACKSIZE - _SC_THREAD_ATTR_STACKSIZE"
457 Affected functions are
461 .IR pthread_attr_getstack (),
462 .IR pthread_attr_getstacksize (),
463 .IR pthread_attr_setstack (),
464 .IR pthread_attr_setstacksize ().
468 .SS "TCT - _POSIX_THREAD_CPUTIME - _SC_THREAD_CPUTIME"
469 The clockID CLOCK_THREAD_CPUTIME_ID is supported.
470 This option implies the _POSIX_TIMERS option.
471 Affected functions are
475 .IR pthread_getcpuclockid (),
477 .IR clock_gettime (),
478 .IR clock_settime (),
483 .SS "TPI - _POSIX_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_INHERIT"
484 Affected functions are
488 .IR pthread_mutexattr_getprotocol (),
489 .IR pthread_mutexattr_setprotocol ().
493 .SS "TPP - _POSIX_THREAD_PRIO_PROTECT - _SC_THREAD_PRIO_PROTECT"
494 Affected functions are
498 .IR pthread_mutex_getprioceiling (),
499 .IR pthread_mutex_setprioceiling (),
500 .IR pthread_mutexattr_getprioceiling (),
501 .IR pthread_mutexattr_getprotocol (),
502 .IR pthread_mutexattr_setprioceiling (),
503 .IR pthread_mutexattr_setprotocol ().
507 .SS "TPS - _POSIX_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIORITY_SCHEDULING"
508 If this option is in effect, the different threads inside a process
509 can run with different priorities and/or different schedulers.
510 Affected functions are
514 .IR pthread_attr_getinheritsched (),
515 .IR pthread_attr_getschedpolicy (),
516 .IR pthread_attr_getscope (),
517 .IR pthread_attr_setinheritsched (),
518 .IR pthread_attr_setschedpolicy (),
519 .IR pthread_attr_setscope (),
520 .IR pthread_getschedparam (),
521 .IR pthread_setschedparam (),
522 .IR pthread_setschedprio ().
526 .SS "TSH - _POSIX_THREAD_PROCESS_SHARED - _SC_THREAD_PROCESS_SHARED"
527 Affected functions are
531 .IR pthread_barrierattr_getpshared (),
532 .IR pthread_barrierattr_setpshared (),
533 .IR pthread_condattr_getpshared (),
534 .IR pthread_condattr_setpshared (),
535 .IR pthread_mutexattr_getpshared (),
536 .IR pthread_mutexattr_setpshared (),
537 .IR pthread_rwlockattr_getpshared (),
538 .IR pthread_rwlockattr_setpshared ().
542 .SS "TSF - _POSIX_THREAD_SAFE_FUNCTIONS - _SC_THREAD_SAFE_FUNCTIONS"
543 Affected functions are
555 .IR getc_unlocked (),
556 .IR getchar_unlocked (),
557 .IR putc_unlocked (),
558 .IR putchar_unlocked (),
569 .SS "TSP - _POSIX_THREAD_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER"
570 This option implies the _POSIX_THREAD_PRIORITY_SCHEDULING option.
571 Affected functions are
575 .IR sched_getparam (),
576 .IR sched_setparam (),
577 .IR sched_setscheduler ().
581 .SS "THR - _POSIX_THREADS - _SC_THREADS"
582 Basic support for POSIX threads is available. The functions
586 .IR pthread_atfork (),
587 .IR pthread_attr_destroy (),
588 .IR pthread_attr_getdetachstate (),
589 .IR pthread_attr_getschedparam (),
590 .IR pthread_attr_init (),
591 .IR pthread_attr_setdetachstate (),
592 .IR pthread_attr_setschedparam (),
593 .IR pthread_cancel (),
594 .IR pthread_cleanup_push (),
595 .IR pthread_cleanup_pop (),
596 .IR pthread_cond_broadcast (),
597 .IR pthread_cond_destroy (),
598 .IR pthread_cond_init (),
599 .IR pthread_cond_signal (),
600 .IR pthread_cond_timedwait (),
601 .IR pthread_cond_wait (),
602 .IR pthread_condattr_destroy (),
603 .IR pthread_condattr_init (),
604 .IR pthread_create (),
605 .IR pthread_detach (),
606 .IR pthread_equal (),
608 .IR pthread_getspecific (),
610 .IR pthread_key_create (),
611 .IR pthread_key_delete (),
612 .IR pthread_mutex_destroy (),
613 .IR pthread_mutex_init (),
614 .IR pthread_mutex_lock (),
615 .IR pthread_mutex_trylock (),
616 .IR pthread_mutex_unlock (),
617 .IR pthread_mutexattr_destroy (),
618 .IR pthread_mutexattr_init (),
620 .IR pthread_rwlock_destroy (),
621 .IR pthread_rwlock_init (),
622 .IR pthread_rwlock_rdlock (),
623 .IR pthread_rwlock_tryrdlock (),
624 .IR pthread_rwlock_trywrlock (),
625 .IR pthread_rwlock_unlock (),
626 .IR pthread_rwlock_wrlock (),
627 .IR pthread_rwlockattr_destroy (),
628 .IR pthread_rwlockattr_init (),
630 .IR pthread_setcancelstate (),
631 .IR pthread_setcanceltype (),
632 .IR pthread_setspecific (),
633 .IR pthread_testcancel ()
638 .SS "TMO - _POSIX_TIMEOUTS - _SC_TIMEOUTS"
643 .IR mq_timedreceive (),
645 .IR pthread_mutex_timedlock (),
646 .IR pthread_rwlock_timedrdlock (),
647 .IR pthread_rwlock_timedwrlock (),
648 .IR sem_timedwait (),
649 .IR posix_trace_timedgetnext_event ()
654 .SS "TMR - _POSIX_TIMERS - _SC_TIMERS"
660 .IR clock_gettime (),
661 .IR clock_settime (),
665 .IR timer_gettime (),
666 .IR timer_getoverrun (),
672 .SS "TRC - _POSIX_TRACE - _SC_TRACE"
673 POSIX tracing is available. The functions
677 .IR posix_trace_attr_destroy (),
678 .IR posix_trace_attr_getclockres (),
679 .IR posix_trace_attr_getcreatetime (),
680 .IR posix_trace_attr_getgenversion (),
681 .IR posix_trace_attr_getmaxdatasize (),
682 .IR posix_trace_attr_getmaxsystemeventsize (),
683 .IR posix_trace_attr_getmaxusereventsize (),
684 .IR posix_trace_attr_getname (),
685 .IR posix_trace_attr_getstreamfullpolicy (),
686 .IR posix_trace_attr_getstreamsize (),
687 .IR posix_trace_attr_init (),
688 .IR posix_trace_attr_setmaxdatasize (),
689 .IR posix_trace_attr_setname (),
690 .IR posix_trace_attr_setstreamsize (),
691 .IR posix_trace_attr_setstreamfullpolicy (),
692 .IR posix_trace_clear (),
693 .IR posix_trace_create (),
694 .IR posix_trace_event (),
695 .IR posix_trace_eventid_equal (),
696 .IR posix_trace_eventid_get_name (),
697 .IR posix_trace_eventid_open (),
698 .IR posix_trace_eventtypelist_getnext_id (),
699 .IR posix_trace_eventtypelist_rewind (),
700 .IR posix_trace_flush (),
701 .IR posix_trace_get_attr (),
702 .IR posix_trace_get_status (),
703 .IR posix_trace_getnext_event (),
704 .IR posix_trace_shutdown (),
705 .IR posix_trace_start (),
706 .IR posix_trace_stop (),
707 .IR posix_trace_trygetnext_event ()
712 .SS "TEF - _POSIX_TRACE_EVENT_FILTER - _SC_TRACE_EVENT_FILTER"
713 This option implies the _POSIX_TRACE option.
718 .IR posix_trace_eventset_add (),
719 .IR posix_trace_eventset_del (),
720 .IR posix_trace_eventset_empty (),
721 .IR posix_trace_eventset_fill (),
722 .IR posix_trace_eventset_ismember (),
723 .IR posix_trace_get_filter (),
724 .IR posix_trace_set_filter (),
725 .IR posix_trace_trid_eventid_open ()
730 .SS "TRI - _POSIX_TRACE_INHERIT - _SC_TRACE_INHERIT"
731 Tracing children of the traced process is supported.
732 This option implies the _POSIX_TRACE option.
737 .IR posix_trace_attr_getinherited (),
738 .IR posix_trace_attr_setinherited ()
743 .SS "TRL - _POSIX_TRACE_LOG - _SC_TRACE_LOG"
744 This option implies the _POSIX_TRACE option.
749 .IR posix_trace_attr_getlogfullpolicy (),
750 .IR posix_trace_attr_getlogsize (),
751 .IR posix_trace_attr_setlogfullpolicy (),
752 .IR posix_trace_attr_setlogsize (),
753 .IR posix_trace_close (),
754 .IR posix_trace_create_withlog (),
755 .IR posix_trace_open (),
756 .IR posix_trace_rewind ()
761 .SS "TYM - _POSIX_TYPED_MEMORY_OBJECTS - _SC_TYPED_MEMORY_OBJECT"
766 .IR posix_mem_offset (),
767 .IR posix_typed_mem_get_info (),
768 .IR posix_typed_mem_open ()
773 .SS "--- - _POSIX_VDISABLE"
774 Always present (probably 0). Value to set a changeable special control
775 character to indicate that it is disabled.
776 .SH "XOPEN EXTENSIONS"
779 .BR _XOPEN_REALTIME ,
780 .BR _XOPEN_REALTIME_THREADS ,