[+]Misprints
Summary:( Total:18238 / Covered:7167 / Failed:158)
- [+]!other (628 / 177 / 0)
- [+]FD_CLR (5 / 0 / 0)
- FD_CLR.01
File descriptor masks of type fd_set can be initialized and tested with FD_CLR(), FD_ISSET(), FD_SET(), and FD_ZERO().
- FD_CLR.02
It is unspecified whether each of these is a macro or a function.
- FD_CLR.03
If a macro definition is suppressed in order to access an actual function, or a program defines an external identifier with any of these names, the behavior is undefined.
- FD_CLR.04
FD_CLR(fd, fdsetp) shall remove the file descriptor fd from the set pointed to by fdsetp.
- FD_CLR.05
If fd is not a member of this set, there shall be no effect on the set, nor will an error be returned.
- app.FD_CLR.06
The behavior of these macros is undefined if the fd argument is less than 0 or greater than or equal to FD_SETSIZE, or if fd is not a valid file descriptor, or if any of the arguments are expressions with side effects.
- [+]FD_ISSET (6 / 0 / 0)
- FD_ISSET.01
File descriptor masks of type fd_set can be initialized and tested with FD_CLR(), FD_ISSET(), FD_SET(), and FD_ZERO().
- FD_ISSET.02
It is unspecified whether each of these is a macro or a function.
- FD_ISSET.03
If a macro definition is suppressed in order to access an actual function, or a program defines an external identifier with any of these names, the behavior is undefined.
- FD_ISSET.04
FD_ISSET(fd, fdsetp) shall evaluate to non-zero if the file descriptor fd is a member of the set pointed to by fdsetp, and shall evaluate to zero otherwise.
- app.FD_ISSET.06
The behavior of these macros is undefined if the fd argument is less than 0 or greater than or equal to FD_SETSIZE, or if fd is not a valid file descriptor, or if any of the arguments are expressions with side effects.
- FD_ISSET.06.01
FD_ISSET() shall return a non-zero value if the bit for the file descriptor fd is set in the file descriptor set pointed to by fdset,
- FD_ISSET.06.02
and 0 otherwise.
- [+]FD_SET (5 / 0 / 0)
- FD_SET.01
File descriptor masks of type fd_set can be initialized and tested with FD_CLR(), FD_ISSET(), FD_SET(), and FD_ZERO().
- FD_SET.02
It is unspecified whether each of these is a macro or a function.
- FD_SET.03
If a macro definition is suppressed in order to access an actual function, or a program defines an external identifier with any of these names, the behavior is undefined.
- FD_SET.04
FD_SET(fd, fdsetp) shall add the file descriptor fd to the set pointed to by fdsetp.
- FD_SET.05
If the file descriptor fd is already in this set, there shall be no effect on the set, nor will an error be returned.
- app.FD_SET.06
The behavior of these macros is undefined if the fd argument is less than 0 or greater than or equal to FD_SETSIZE, or if fd is not a valid file descriptor, or if any of the arguments are expressions with side effects.
- [+]FD_ZERO (5 / 0 / 0)
- FD_ZERO.01
File descriptor masks of type fd_set can be initialized and tested with FD_CLR(), FD_ISSET(), FD_SET(), and FD_ZERO().
- FD_ZERO.02
It is unspecified whether each of these is a macro or a function.
- FD_ZERO.03
If a macro definition is suppressed in order to access an actual function, or a program defines an external identifier with any of these names, the behavior is undefined.
- FD_ZERO.04
FD_ZERO(fdsetp) shall initialize the descriptor set pointed to by fdsetp to the null set.
- FD_ZERO.05
No error is returned if the set is not empty at the time FD_ZERO() is invoked.
- app.FD_ZERO.06
The behavior of these macros is undefined if the fd argument is less than 0 or greater than or equal to FD_SETSIZE, or if fd is not a valid file descriptor, or if any of the arguments are expressions with side effects.
- [+]__assertion_fail (0 / 0 / 0)
- app.__assertion_fail.04
assertion, file, and line shall be non-NULL
- [+]__pthread_cleanup_pop (1 / 0 / 0)
- __pthread_cleanup_pop.30
The _pthread_cleanup_pop() function provides an implementation of the pthread_cleanup_pop() macro described in ISO POSIX (2003).
- [+]__pthread_cleanup_push (1 / 0 / 0)
- __pthread_cleanup_push.30
The _pthread_cleanup_push() function provides an implementation of the pthread_cleanup_push() macro described in ISO POSIX (2003).
- [+]delay_mode (5 / 0 / 0)
- delay_mode.01
Two mutually-exclusive delay modes specify how quickly certain Curses functions return to the application when there is no terminal input waiting when the function is called:
- delay_mode.01.01
No Delay
- delay_mode.01.01.01
The function fails.
- delay_mode.01.02
Delay
- delay_mode.01.02.01
The application waits until the implementation passes text through to the application.
- delay_mode.01.02.02
If cbreak or Raw Mode is set, this is after one character.
- delay_mode.01.02.03
Otherwise, this is after the first <newline> character, end-of-line character, or end-of-file character.
- delay_mode.03
The effect of No Delay Mode on function key processing is unspecified.
- [+]echo_processing (9 / 0 / 0)
- echo_processing.01
Echo mode determines whether Curses echoes typed characters to the screen.
- echo_processing.02
The effect of Echo mode is analogous to the effect of the ECHO flag in the local mode field of the termios structure associated with the terminal device connected to the window.
- echo_processing.03
However, Curses always clears the ECHO flag when invoked, to inhibit the operating system from performing echoing.
- echo_processing.04
The method of echoing characters is not identical to the operating system's method of echoing characters, because Curses performs additional processing of terminal input.
- echo_processing.05
If in Echo mode, Curses performs its own echoing: Any visible input character is stored in the current or specified window by the input function that the application called, at that window's cursor position, as though addch() were called, with all consequent effects such as cursor movement and wrapping.
- echo_processing.06
If not in Echo mode, any echoing of input must be performed by the application.
- echo_processing.07
Applications often perform their own echoing in a controlled area of the screen, or do not echo at all, so they disable Echo mode.
- echo_processing.08
It may not be possible to turn off echo processing for synchronous and networked asynchronous terminals because echo processing is done directly by the terminals.
- echo_processing.09
Applications running on such terminals should be aware that any characters typed will appear on the screen at wherever the cursor is positioned.
- [+]erasewchar (2 / 0 / 0)
- erasewchar.01
The erasewchar() function stores the current erase character in the object pointed to by ch.
- erasewchar.02
If no erase character has been defined, the function will fail and the object pointed to by ch will not be changed.
- [+]exp2l (15 / 8 / 0)
- exp2l.01
These functions shall compute the base-2 exponential of x.
- exp2l.02
An application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions.
- exp2l.03
On return, if errno is non-zero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred.
- exp2l.04
Upon successful completion, these functions shall return 2x.
- exp2l.05
If the correct value would cause overflow, a range error shall occur and exp2(), exp2f(), and exp2l() shall return the value of the macro HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively.
- exp2l.06
If the correct value would cause underflow, and is not representable, a range error may occur, and [MX] either 0.0 (if supported), or an implementation-defined value shall be returned.
- exp2l.07
[MX] If x is NaN, a NaN shall be returned.
- exp2l.08
If x is ?0, 1 shall be returned.
- exp2l.09
If x is -Inf, +0 shall be returned.
- exp2l.10
If x is +Inf, x shall be returned.
- exp2l.11
If the correct value would cause underflow, and is representable, a range error may occur and the correct value shall be returned.
- exp2l.12
These functions shall fail if:
- exp2l.12.01
Range Error The result overflows.
- exp2l.12.01.01
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE].
- exp2l.12.01.02
If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the overflow floating-point exception shall be raised.
- exp2l.13
These functions may fail if:
- exp2l.13.01
Range Error The result underflows.
- exp2l.13.01.01
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE].
- exp2l.13.01.02
If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the underflow floating-point exception shall be raised.
- [+]general_signal (33 / 0 / 0)
- general_signal.01
Signals which are generated by some action attributable to a particular thread, such as a hardware fault, shall be generated for the thread that caused the signal to be generated
- general_signal.02
Signals that are generated in association with a process ID or process group ID or an asynchronous event, such as terminal activity, shall be generated for the process
- general_signal.03
When SIGCONT is generated for a process that is stopped, the process shall be continued, even if the SIGCONT signal is blocked or ignored.
- general_signal.04
If SIGCONT is blocked and not ignored, it shall remain pending until it is either unblocked or a stop signal is generated for the process.
- general_signal.05
SIG_DFL
- general_signal.05.01
The default actions for the signals defined in this volume of IEEE Std 1003.1-2001 are specified under <signal.h>. [RTS]
- general_signal.05.02
If the Realtime Signals Extension option is supported, the default actions for the realtime signals in the range SIGRTMIN to SIGRTMAX shall be to terminate the process abnormally.
- general_signal.06
If the default action is to stop the process, the execution of that process is temporarily suspended.
- general_signal.07
When a process stops, a SIGCHLD signal shall be generated for its parent process, unless the parent process has set the SA_NOCLDSTOP flag.
- general_signal.08
While a process is stopped
- general_signal.08.01
any additional signals that are sent to the process shall not be delivered until the process is continued
- general_signal.08.02
except SIGKILL which always terminates the receiving process
- general_signal.09
A process that is a member of an orphaned process group
- general_signal.09.01
shall not be allowed to stop in response to the SIGTSTP, SIGTTIN, or SIGTTOU signals
- general_signal.09.02
In cases where delivery of one of these signals would stop such a process, the signal shall be discarded.
- general_signal.10
The default action for SIGCONT is to resume execution at the point where the process was stopped, after first handling any pending unblocked signals
- general_signal.11
When a stopped process is continued, a SIGCHLD signal may be generated for its parent process, unless the parent process has set the SA_NOCLDSTOP flag
- general_signal.12
SIG_IGN
- general_signal.12.01
Delivery of the signal shall have no effect on the process.
- general_signal.12.02
The behavior of a process is undefined after it ignores a SIGFPE, SIGILL, SIGSEGV, [RTS] or SIGBUS signal that was not generated by kill(), [RTS] sigqueue(), or raise().
- general_signal.13
Setting a signal action to SIG_IGN
- general_signal.13.01
for a signal that is pending shall cause the pending signal to be discarded, whether or not it is blocked.
- general_signal.13.02
If the Realtime Signals Extension option is supported, any queued values pending shall be discarded and the resources used to queue them shall be released and made available to queue other signals.
- general_signal.14
If a process sets the action for the SIGCHLD signal to SIG_IGN, the behavior is unspecified, [XSI] except as specified below.
- general_signal.14.01
If the action for the SIGCHLD signal is set to SIG_IGN, child processes of the calling processes shall not be transformed into zombie processes when they terminate. If the calling process subsequently waits for its children, and the process has no unwaited-for children that were transformed into zombie processes, it shall block until all of its children terminate, and wait(), waitid(), and waitpid() shall fail and set errno to [ECHILD].
- general_signal.15
pointer to a function
- general_signal.15.01
On delivery of the signal, the receiving process is to execute the signal-catching function at the specified address. After returning from the signal-catching function, the receiving process shall resume execution at the point at which it was interrupted.
- general_signal.16
The si_code member shall contain a code identifying the cause of the signal.
- general_signal.16.01
SI_USER
- general_signal.16.01.01
The signal was sent by the kill() function
- general_signal.16.01.02
The implementation may set si_code to SI_USER if the signal was sent by the raise() or abort() functions or any similar functions provided as implementation extensions
- general_signal.16.02
SI_QUEUE [RTS] The signal was sent by the sigqueue() function.
- general_signal.16.03
SI_TIMER [RTS] The signal was generated by the expiration of a timer set by timer_settime().
- general_signal.16.04
SI_ASYNCIO [RTS] The signal was generated by the completion of an asynchronous I/O request.
- general_signal.16.05
SI_MESGQ [RTS] The signal was generated by the arrival of a message on an empty message queue.
- general_signal.16.06
If the signal was not generated by one of the functions or events listed above, the si_code shall be set to an implementation-defined value that is not equal to any of the values defined above.
- general_signal.17
If the Realtime Signals Extension is supported, and si_code is one of SI_QUEUE, SI_TIMER, SI_ASYNCIO, or SI_MESGQ
- general_signal.17.01
then si_value shall contain the application-specified signal value
- general_signal.17.02
Otherwise, the contents of si_value are undefined
- general_signal.18
The behavior of a process is undefined after it returns normally from a signal-catching function for a [XSI] SIGBUS, SIGFPE, SIGILL, or SIGSEGV signal that was not generated by kill(), [RTS] sigqueue(), or raise().
- general_signal.19
If a process establishes a signal-catching function for the SIGCHLD signal while it has a terminated child process for which it has not waited, it is unspecified whether a SIGCHLD signal is generated to indicate that child process.
- general_signal.20
When a signal is delivered to a thread, if the action of that signal specifies termination, stop, or continue, the entire process shall be terminated, stopped, or continued, respectively.
- general_signal.21
Signals affect the behavior of certain functions defined by this volume of IEEE Std 1003.1-2001 if delivered to a process while it is executing such a function.
- general_signal.21.01
If the action of the signal is to terminate the process, the process shall be terminated and the function shall not return
- [+]getwc_unlocked (18 / 0 / 0)
- getwc_unlocked.fgetwc.01.01
The fgetwc() function shall obtain the next character (if present) from the input stream pointed to by stream,
- getwc_unlocked.fgetwc.01.02
convert that to the corresponding wide-character code,
- getwc_unlocked.fgetwc.01.03
and advance the associated file position indicator for the stream (if defined).
- getwc_unlocked.fgetwc.02
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- getwc_unlocked.fgetwc.03
The fgetwc() function may mark the st_atime field of the file associated with stream for update.
- getwc_unlocked.fgetwc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getwc_unlocked.fgetwc.05
Upon successful completion, the fgetwc() function shall return the wide-character code of the character read from the input stream pointed to by stream converted to a type wint_t.
- getwc_unlocked.fgetwc.06
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetwc() shall return WEOF.
- getwc_unlocked.fgetwc.07
If a read error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, [CX] and shall set errno to indicate the error.
- getwc_unlocked.fgetwc.08
If an encoding error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, and shall set errno to indicate the error.
- getwc_unlocked.fgetwc.09
The fgetwc() function shall fail if data needs to be read and:
- getwc_unlocked.fgetwc.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetwc() operation.
- getwc_unlocked.fgetwc.09.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getwc_unlocked.fgetwc.09.03
[EILSEQ] The data obtained from the input stream does not form a valid character.
- getwc_unlocked.fgetwc.09.04
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getwc_unlocked.fgetwc.09.05
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getwc_unlocked.fgetwc.09.06
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getwc_unlocked.fgetwc.10
The fgetwc() function may fail if:
- getwc_unlocked.fgetwc.10.01
[ENOMEM] [CX] Insufficient storage space is available.
- getwc_unlocked.fgetwc.10.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]input_mode (9 / 0 / 0)
- input_mode.01
The XBD specification (Special Characters) defines flow-control characters, the interrupt character, the erase character, and the kill character.
- input_mode.02
Four mutually-exclusive Curses modes let the application control the effect of these input characters:
- input_mode.02.01.01
Cooked Mode This achieves normal line-at-a-time processing with all special characters handled outside the application. This achieves the same effect as canonical-mode input processing as specified in the XBD specification. The state of the ISIG and IXON flags are not changed upon entering this mode by calling and are set upon entering this mode by calling
- input_mode.02.01.02
The implementation supports erase and kill characters from any supported locale, no matter what the width of the character is.
- input_mode.02.02
cbreak Mode Characters typed by the user are immediately available to the application and Curses does not perform special processing on either the erase character or the kill character. An application can select cbreak mode to do its own line editing but to let the abort character be used to abort the task. This mode achieves the same effect as non-canonical-mode, Case B input processing (with MIN set to 1 and ICRNL cleared) as specified in the XBD specification. The state of the ISIG and IXON flags are not changed upon entering this mode.
- input_mode.02.03
Half-Delay Mode The effect is the same as cbreak, except that input functions wait until a character is available or an interval defined by the application elapses, whichever comes first. This mode achieves the same effect as non-canonical-mode, Case C input processing (with TIME set to the value specified by the application) as specified in the XBD specification. The state of the ISIG and IXON flags are not changed upon entering this mode.
- input_mode.02.04
Raw Mode Raw mode gives the application maximum control over terminal input. The application sees each character as it is typed. This achieves the same effect as non-canonical mode, Case D input processing as specified in the XBD specification. The ISIG and IXON flags are cleared upon entering this mode.
- input_mode.03
The terminal interface settings are recorded when the process calls initscr() or newterm() to initialise Curses and restores these settings when endwin() is called.
- input_mode.04
The initial input mode for Curses operations is unspecified unless the implementation supports Enhanced Curses compliance, in which the initial input mode is cbreak mode.
- input_mode.05
The behaviour of the BREAK key depends on other bits in the display driver that are not set by Curses.
- [+]io (1 / 1 / 0)
- io.term.01
The default on the opening of a terminal file is that neither its input nor its output are suspended.
- app.io.term.01
Conforming applications shall ensure that they call unlockpt() before opening the slave side of a pseudo-terminal device.
- [+]key_name (6 / 0 / 0)
- key_name.01
The keyname() and key_name() functions generate a character string whose value describes the key c.
- key_name.02
The c argument of key_name() must be a wide character.
- key_name.03
The string has a format according to the first applicable row in the following table: Input Format of Returned String Visible character The same character Control character ^X Meta-character (keyname() only) M-X Key value defined in <curses.h> (keyname() only) KEY_name None of the above UNKNOWN KEY
- key_name.04
The meta-character notation shown above is used only if meta-characters are enabled.
- key_name.05.01
Upon successful completion, keyname() returns a pointer to a string as described above.
- key_name.05.02
Otherwise, it returns a null pointer.
- [+]keypad_processing (18 / 0 / 0)
- keypad_processing.01
The application can enable or disable keypad translation by calling keypad().
- keypad_processing.02
When translation is enabled, Curses attempts to translate a sequence of terminal input that represents the pressing of a function key into a single key code.
- keypad_processing.03
When translation is disabled, Curses passes terminal input to the application without such translation, and any interpretation of the input as representing the pressing of a keypad key must be done by the application.
- keypad_processing.04
The complete set of key codes for keypad keys that Curses can process is specified by the constants defined in <curses.h> whose names begin with "KEY_".
- keypad_processing.05
Each terminal type described in the terminfo database may support some or all of these key codes.
- keypad_processing.06
The terminfo database specifies the sequence of input characters from the terminal type that correspond to each key code (see ).
- keypad_processing.07
The Curses implementation cannot translate keypad keys on terminals where pressing the keys does not transmit a unique sequence.
- keypad_processing.08
When translation is enabled and a character that could be the beginning of a function key (such as escape) is received, Curses notes the time and begins accumulating characters.
- keypad_processing.09
If Curses receives additional characters that represent the pressing of a keypad key, within an unspecified interval from the time the first character was received, then Curses converts this input to a key code for presentation to the application.
- keypad_processing.10
If such characters are not received during this interval, translation of this input does not occur and the individual characters are presented to the application separately. (Because Curses waits for this interval to accumulate a key code, many terminals experience a delay between the time a user presses the escape key and the time the escape is returned to the application.)
- keypad_processing.11
In addition, No Timeout Mode provides that in any case where Curses has received part of a function key sequence, it waits indefinitely for the complete key sequence.
- keypad_processing.12
The "unspecified interval" in the previous paragraph becomes infinite in No Timeout Mode.
- keypad_processing.13
No Timeout Mode allows the use of function keys over slow communication lines.
- keypad_processing.14
No Timeout Mode lets the user type the individual characters of a function key sequence, but also delays application response when the user types a character (not a function key) that begins a function key sequence.
- keypad_processing.15
For this reason, in No Timeout Mode many terminals will appear to hang between the time a user presses the escape key and the time another key is pressed.
- keypad_processing.16
No Timeout Mode is switchable by calling notimeout().
- keypad_processing.17
If any special characters (see Special Characters ) are defined or redefined to be characters that are members of a function key sequence, then Curses will be unable to recognise and translate those function keys.
- keypad_processing.18
Several of the modes discussed below are described in terms of availability of input. If keypad translation is enabled, then input is not available once Curses has begun receiving a keypad sequence until the sequence is completely received or the interval has elapsed.
- [+]killwchar (2 / 0 / 0)
- killwchar.01
The killwchar() function stores the current line kill character in the object pointed to by ch.
- killwchar.02
If no line kill character has been defined, the function will fail and the object pointed to by ch will not be changed.
- [+]limits (137 / 65 / 0)
- limits.1
{AIO_LISTIO_MAX} [AIO]
Maximum number of I/O operations in a single list I/O call supported by the implementation.
Minimum Acceptable Value: {_POSIX_AIO_LISTIO_MAX}
- limits.10
{LOGIN_NAME_MAX} Maximum length of a login name.
Minimum Acceptable Value: {_POSIX_LOGIN_NAME_MAX}
- limits.100
{_POSIX2_BC_SCALE_MAX} Maximum scale value allowed by the bc utility.
Value: 99
- limits.101
{_POSIX2_BC_STRING_MAX} Maximum length of a string constant accepted by the bc utility.
Value: 1 000
- limits.102
{_POSIX2_CHARCLASS_NAME_MAX} Maximum number of bytes in a character class name.
Value: 14
- limits.103
{_POSIX2_COLL_WEIGHTS_MAX} Maximum number of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file; see Locale.
Value: 2
- limits.104
{_POSIX2_EXPR_NEST_MAX} Maximum number of expressions that can be nested within parentheses by the expr utility.
Value: 32
- limits.105
{_POSIX2_LINE_MAX} Unless otherwise noted, the maximum length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailing <newline>.
Value: 2 048
- limits.106
{_POSIX2_RE_DUP_MAX] Maximum number of repeated occurrences of a regular expression permitted when using the interval notation \{m,n\}; see Regular Expressions.
Value: 255
- limits.107
{_XOPEN_IOV_MAX} [XSI]
Maximum number of iovec structures that one process has available for use with readv() or writev().
Value: 16
- limits.108
{_XOPEN_NAME_MAX} [XSI]
Maximum number of bytes in a filename (not including the terminating null).
Value: 255
- limits.109
{_XOPEN_PATH_MAX} [XSI]
Maximum number of bytes in a pathname.
Value: 1024
- limits.11
{MQ_OPEN_MAX} [MSG]
The maximum number of open message queue descriptors a process may hold.
Minimum Acceptable Value: {_POSIX_MQ_OPEN_MAX}
- limits.110
{CHAR_BIT} Number of bits in a type char.
[CX] Value: 8
- limits.111
{CHAR_MAX} Maximum value of type char.
Value: {UCHAR_MAX} or {SCHAR_MAX}
- limits.112
{CHAR_MIN} Minimum value of type char.
Value: {SCHAR_MIN} or 0
- limits.113
{INT_MAX} Maximum value of an int.
[CX] Minimum Acceptable Value: 2 147 483 647
- limits.114
{LONG_BIT} [XSI]
Number of bits in a long.
Minimum Acceptable Value: 32
- limits.115
{LONG_MAX} Maximum value of a long.
Minimum Acceptable Value: +2 147 483 647
- limits.116
{MB_LEN_MAX} Maximum number of bytes in a character, for any supported locale.
Minimum Acceptable Value: 1
- limits.117
{SCHAR_MAX} Maximum value of type signed char.
[CX] Value: +127
- limits.118
{SHRT_MAX} Maximum value of type short.
Minimum Acceptable Value: +32 767
- limits.119
{SSIZE_MAX} Maximum value of an object of type ssize_t.
Minimum Acceptable Value: {_POSIX_SSIZE_MAX}
- limits.12
{MQ_PRIO_MAX} [MSG]
The maximum number of message priorities supported by the implementation.
Minimum Acceptable Value: {_POSIX_MQ_PRIO_MAX}
- limits.120
{UCHAR_MAX} Maximum value of type unsigned char.
[CX] Value: 255
- limits.121
{UINT_MAX} Maximum value of type unsigned.
[CX] Minimum Acceptable Value: 4 294 967 295
- limits.122
{ULONG_MAX} Maximum value of type unsigned long.
Minimum Acceptable Value: 4 294 967 295
- limits.123
{USHRT_MAX} Maximum value for a type unsigned short.
Minimum Acceptable Value: 65 535
- limits.124
{WORD_BIT} [XSI]
Number of bits in a type int.
Minimum Acceptable Value: 32
- limits.125
{INT_MIN} Minimum value of type int.
[CX] Maximum Acceptable Value: -2 147 483 647
- limits.126
{LONG_MIN} Minimum value of type long.
Maximum Acceptable Value: -2 147 483 647
- limits.127
{SCHAR_MIN} Minimum value of type signed char.
[CX] Value: -128
- limits.128
{SHRT_MIN} Minimum value of type short.
Maximum Acceptable Value: -32 767
- limits.129
{LLONG_MIN} Minimum value of type long long.
Maximum Acceptable Value: -9223372036854775807
- limits.13
{OPEN_MAX} Maximum number of files that one process can have open at any one time.
Minimum Acceptable Value: {_POSIX_OPEN_MAX}
- limits.130
{LLONG_MAX} Maximum value of type long long.
Minimum Acceptable Value: +9223372036854775807
- limits.131
{ULLONG_MAX} Maximum value of type unsigned long long.
Minimum Acceptable Value: 18446744073709551615
- limits.132
{NL_ARGMAX} [XSI]
Maximum value of digit in calls to the printf() and scanf() functions.
Minimum Acceptable Value: 9
- limits.133
{NL_LANGMAX} [XSI]
Maximum number of bytes in a LANG name.
Minimum Acceptable Value: 14
- limits.134
{NL_MSGMAX} [XSI]
Maximum message number.
Minimum Acceptable Value: 32 767
- limits.135
{NL_NMAX} [XSI]
Maximum number of bytes in an N-to-1 collation mapping.
Minimum Acceptable Value: No guaranteed value across all conforming implementations.
- limits.136
{NL_SETMAX} [XSI]
Maximum set number.
Minimum Acceptable Value: 255
- limits.137
{NL_TEXTMAX} [XSI]
Maximum number of bytes in a message string.
Minimum Acceptable Value: {_POSIX2_LINE_MAX}
- limits.138
{NZERO} [XSI]
Default process priority.
Minimum Acceptable Value: 20
- limits.14
{PAGESIZE} Size in bytes of a page.
Minimum Acceptable Value: 1
- limits.15
{PAGE_SIZE} [XSI]
Equivalent to {PAGESIZE}. If either {PAGESIZE} or {PAGE_SIZE} is defined, the other is defined with the same value.
- limits.16
{PTHREAD_DESTRUCTOR_ITERATIONS} [THR]
Maximum number of attempts made to destroy a thread's thread-specific data values on thread exit.
Minimum Acceptable Value: {_POSIX_THREAD_DESTRUCTOR_ITERATIONS}
- limits.17
{PTHREAD_KEYS_MAX} [THR]
Maximum number of data keys that can be created by a process.
Minimum Acceptable Value: {_POSIX_THREAD_KEYS_MAX}
- limits.18
{PTHREAD_STACK_MIN} [THR]
Minimum size in bytes of thread stack storage.
Minimum Acceptable Value: 0
- limits.19
{PTHREAD_THREADS_MAX} [THR]
Maximum number of threads that can be created per process.
Minimum Acceptable Value: {_POSIX_THREAD_THREADS_MAX}
- limits.2
{AIO_MAX} [AIO]
Maximum number of outstanding asynchronous I/O operations supported by the implementation.
Minimum Acceptable Value: {_POSIX_AIO_MAX}
- limits.20
{RE_DUP_MAX} The number of repeated occurrences of a BRE permitted by the regexec() and regcomp() functions when using the interval notation {\(m,n\}; see BREs Matching Multiple Characters.
Minimum Acceptable Value: {_POSIX2_RE_DUP_MAX}
- limits.21
{RTSIG_MAX} [RTS]
Maximum number of realtime signals reserved for application use in this implementation.
Minimum Acceptable Value: {_POSIX_RTSIG_MAX}
- limits.22
{SEM_NSEMS_MAX} [SEM]
Maximum number of semaphores that a process may have.
Minimum Acceptable Value: {_POSIX_SEM_NSEMS_MAX}
- limits.23
{SEM_VALUE_MAX} [SEM]
The maximum value a semaphore may have.
Minimum Acceptable Value: {_POSIX_SEM_VALUE_MAX}
- limits.24
{SIGQUEUE_MAX} [RTS]
Maximum number of queued signals that a process may send and have pending at the receiver(s) at any time.
Minimum Acceptable Value: {_POSIX_SIGQUEUE_MAX}
- limits.25
{SS_REPL_MAX} [SS|TSP]
The maximum number of replenishment operations that may be simultaneously pending for a particular sporadic server scheduler.
Minimum Acceptable Value: {_POSIX_SS_REPL_MAX}
- limits.26
{STREAM_MAX} The number of streams that one process can have open at one time. If defined, it has the same value as {FOPEN_MAX} (see <stdio.h>).
Minimum Acceptable Value: {_POSIX_STREAM_MAX}
- limits.27
{SYMLOOP_MAX} Maximum number of symbolic links that can be reliably traversed in the resolution of a pathname in the absence of a loop.
Minimum Acceptable Value: {_POSIX_SYMLOOP_MAX}
- limits.28
{TIMER_MAX} [TMR]
Maximum number of timers per process supported by the implementation.
Minimum Acceptable Value: {_POSIX_TIMER_MAX}
- limits.29
{TRACE_EVENT_NAME_MAX} [TRC]
Maximum length of the trace event name.
Minimum Acceptable Value: {_POSIX_TRACE_EVENT_NAME_MAX}
- limits.3
{AIO_PRIO_DELTA_MAX} [AIO]
The maximum amount by which a process can decrease its asynchronous I/O priority level from its own scheduling priority.
Minimum Acceptable Value: 0
- limits.30
{TRACE_NAME_MAX} [TRC]
Maximum length of the trace generation version string or of the trace stream name.
Minimum Acceptable Value: {_POSIX_TRACE_NAME_MAX}
- limits.31
{TRACE_SYS_MAX} [TRC]
Maximum number of trace streams that may simultaneously exist in the system.
Minimum Acceptable Value: {_POSIX_TRACE_SYS_MAX}
- limits.32
{TRACE_USER_EVENT_MAX} [TRC]
Maximum number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefined user trace event POSIX_TRACE_UNNAMED_USER_EVENT.
Minimum Acceptable Value: {_POSIX_TRACE_USER_EVENT_MAX}
- limits.33
{TTY_NAME_MAX} Maximum length of terminal device name.
Minimum Acceptable Value: {_POSIX_TTY_NAME_MAX}
- limits.34
{TZNAME_MAX} Maximum number of bytes supported for the name of a timezone (not of the TZ variable).
Minimum Acceptable Value: {_POSIX_TZNAME_MAX}
- limits.35
Note: The length given by {TZNAME_MAX} does not include the quoting characters mentioned in Other Environment Variables.
- limits.36
{FILESIZEBITS} Minimum number of bits needed to represent, as a signed integer value, the maximum size of a regular file allowed in the specified directory.
Minimum Acceptable Value: 32
- limits.37
{LINK_MAX} Maximum number of links to a single file.
Minimum Acceptable Value: {_POSIX_LINK_MAX}
- limits.38
{MAX_CANON} Maximum number of bytes in a terminal canonical input line.
Minimum Acceptable Value: {_POSIX_MAX_CANON}
- limits.39
{MAX_INPUT} Minimum number of bytes for which space is available in a terminal input queue; therefore, the maximum number of bytes a conforming application may require to be typed as input before reading them.
Minimum Acceptable Value: {_POSIX_MAX_INPUT}
- limits.4
{ARG_MAX} Maximum length of argument to the exec functions including environment data.
Minimum Acceptable Value: {_POSIX_ARG_MAX}
- limits.40
{NAME_MAX} Maximum number of bytes in a filename (not including terminating null).
Minimum Acceptable Value: {_POSIX_NAME_MAX}
[XSI] Minimum Acceptable Value: {_XOPEN_NAME_MAX}
- limits.41
{PATH_MAX} Maximum number of bytes in a pathname, including the terminating null character.
Minimum Acceptable Value: {_POSIX_PATH_MAX}
[XSI] Minimum Acceptable Value: {_XOPEN_PATH_MAX}
- limits.42
{PIPE_BUF} Maximum number of bytes that is guaranteed to be atomic when writing to a pipe.
Minimum Acceptable Value: {_POSIX_PIPE_BUF}
- limits.43
{POSIX_ALLOC_SIZE_MIN} [ADV]
Minimum number of bytes of storage actually allocated for any portion of a file.
Minimum Acceptable Value: Not specified.
- limits.44
{POSIX_REC_INCR_XFER_SIZE} [ADV]
Recommended increment for file transfer sizes between the {POSIX_REC_MIN_XFER_SIZE} and {POSIX_REC_MAX_XFER_SIZE} values.
Minimum Acceptable Value: Not specified.
- limits.45
{POSIX_REC_MAX_XFER_SIZE} [ADV]
Maximum recommended file transfer size.
Minimum Acceptable Value: Not specified.
- limits.46
{POSIX_REC_MIN_XFER_SIZE} [ADV]
Minimum recommended file transfer size.
Minimum Acceptable Value: Not specified.
- limits.47
{POSIX_REC_XFER_ALIGN} [ADV]
Recommended file transfer buffer alignment.
Minimum Acceptable Value: Not specified.
- limits.48
{SYMLINK_MAX} Maximum number of bytes in a symbolic link.
Minimum Acceptable Value: {_POSIX_SYMLINK_MAX}
- limits.49
{BC_BASE_MAX} Maximum obase values allowed by the bc utility.
Minimum Acceptable Value: {_POSIX2_BC_BASE_MAX}
- limits.5
{ATEXIT_MAX} [XSI]
Maximum number of functions that may be registered with atexit().
Minimum Acceptable Value: 32
- limits.50
{BC_DIM_MAX} Maximum number of elements permitted in an array by the bc utility.
Minimum Acceptable Value: {_POSIX2_BC_DIM_MAX}
- limits.51
{BC_SCALE_MAX} Maximum scale value allowed by the bc utility.
Minimum Acceptable Value: {_POSIX2_BC_SCALE_MAX}
- limits.52
{BC_STRING_MAX} Maximum length of a string constant accepted by the bc utility.
Minimum Acceptable Value: {_POSIX2_BC_STRING_MAX}
- limits.53
{CHARCLASS_NAME_MAX} Maximum number of bytes in a character class name.
Minimum Acceptable Value: {_POSIX2_CHARCLASS_NAME_MAX}
- limits.54
{COLL_WEIGHTS_MAX} Maximum number of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file; see Locale.
Minimum Acceptable Value: {_POSIX2_COLL_WEIGHTS_MAX}
- limits.55
{EXPR_NEST_MAX} Maximum number of expressions that can be nested within parentheses by the expr utility.
Minimum Acceptable Value: {_POSIX2_EXPR_NEST_MAX}
- limits.56
{LINE_MAX} Unless otherwise noted, the maximum length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailing <newline>.
Minimum Acceptable Value: {_POSIX2_LINE_MAX}
- limits.57
{NGROUPS_MAX} Maximum number of simultaneous supplementary group IDs per process.
Minimum Acceptable Value: {_POSIX_NGROUPS_MAX}
- limits.58
{RE_DUP_MAX} Maximum number of repeated occurrences of a regular expression permitted when using the interval notation \{m,n\}; see Regular Expressions.
Minimum Acceptable Value: {_POSIX2_RE_DUP_MAX}
- limits.59
{_POSIX_CLOCKRES_MIN} [TMR]
The resolution of the CLOCK_REALTIME clock, in nanoseconds.
Value: 20 000 000 [MON] If the Monotonic Clock option is supported, the resolution of the CLOCK_MONOTONIC clock, in nanoseconds, is represented by {_POSIX_CLOCKRES_MIN}.
- limits.6
{CHILD_MAX} Maximum number of simultaneous processes per real user ID.
Minimum Acceptable Value: {_POSIX_CHILD_MAX}
- limits.60
{_POSIX_AIO_LISTIO_MAX} [AIO]
The number of I/O operations that can be specified in a list I/O call.
Value: 2
- limits.61
{_POSIX_AIO_MAX} [AIO]
The number of outstanding asynchronous I/O operations.
Value: 1
- limits.62
{_POSIX_ARG_MAX} Maximum length of argument to the exec functions including environment data.
Value: 4 096
- limits.63
{_POSIX_CHILD_MAX} Maximum number of simultaneous processes per real user ID.
Value: 25
- limits.64
{_POSIX_DELAYTIMER_MAX} [TMR]
The number of timer expiration overruns.
Value: 32
- limits.65
{_POSIX_HOST_NAME_MAX} Maximum length of a host name (not including the terminating null) as returned from the gethostname() function.
Value: 255
- limits.66
{_POSIX_LINK_MAX} Maximum number of links to a single file.
Value: 8
- limits.67
{_POSIX_LOGIN_NAME_MAX} The size of the storage required for a login name, in bytes, including the terminating null.
Value: 9
- limits.68
{_POSIX_MAX_CANON} Maximum number of bytes in a terminal canonical input queue.
Value: 255
- limits.69
{_POSIX_MAX_INPUT} Maximum number of bytes allowed in a terminal input queue.
Value: 255
- limits.7
{DELAYTIMER_MAX} [TMR]
Maximum number of timer expiration overruns.
Minimum Acceptable Value: {_POSIX_DELAYTIMER_MAX}
- limits.70
{_POSIX_MQ_OPEN_MAX} [MSG]
The number of message queues that can be open for a single process.
Value: 8
- limits.71
{_POSIX_MQ_PRIO_MAX} [MSG]
The maximum number of message priorities supported by the implementation.
Value: 32
- limits.72
{_POSIX_NAME_MAX} Maximum number of bytes in a filename (not including terminating null).
Value: 14
- limits.73
{_POSIX_NGROUPS_MAX} Maximum number of simultaneous supplementary group IDs per process.
Value: 8
- limits.74
{_POSIX_OPEN_MAX} Maximum number of files that one process can have open at any one time.
Value: 20
- limits.75
{_POSIX_PATH_MAX} Maximum number of bytes in a pathname.
Value: 256
- limits.76
{_POSIX_PIPE_BUF} Maximum number of bytes that is guaranteed to be atomic when writing to a pipe.
Value: 512
- limits.77
{_POSIX_RE_DUP_MAX} The number of repeated occurrences of a BRE permitted by the regexec() and regcomp() functions when using the interval notation {\(m,n\}; see BREs Matching Multiple Characters.
Value: 255
- limits.78
{_POSIX_RTSIG_MAX} [RTS]
The number of realtime signal numbers reserved for application use.
Value: 8
- limits.79
{_POSIX_SEM_NSEMS_MAX} [SEM]
The number of semaphores that a process may have.
Value: 256
- limits.8
{HOST_NAME_MAX} Maximum length of a host name (not including the terminating null) as returned from the gethostname() function.
Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}
- limits.80
{_POSIX_SEM_VALUE_MAX} [SEM]
The maximum value a semaphore may have.
Value: 32 767
- limits.81
{_POSIX_SIGQUEUE_MAX} [RTS]
The number of queued signals that a process may send and have pending at the receiver(s) at any time.
Value: 32
- limits.82
{_POSIX_SSIZE_MAX} The value that can be stored in an object of type ssize_t.
Value: 32 767
- limits.83
{_POSIX_STREAM_MAX} The number of streams that one process can have open at one time.
Value: 8
- limits.84
{_POSIX_SS_REPL_MAX} [SS|TSP]
The number of replenishment operations that may be simultaneously pending for a particular sporadic server scheduler.
Value: 4
- limits.85
{_POSIX_SYMLINK_MAX} The number of bytes in a symbolic link.
Value: 255
- limits.86
{_POSIX_SYMLOOP_MAX} The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop.
Value: 8
- limits.87
{_POSIX_THREAD_DESTRUCTOR_ITERATIONS} [THR]
The number of attempts made to destroy a thread's thread-specific data values on thread exit.
Value: 4
- limits.88
{_POSIX_THREAD_KEYS_MAX} [THR]
The number of data keys per process.
Value: 128
- limits.89
{_POSIX_THREAD_THREADS_MAX} [THR]
The number of threads per process.
Value: 64
- limits.9
{IOV_MAX} [XSI]
Maximum number of iovec structures that one process has available for use with readv() or writev().
Minimum Acceptable Value: {_XOPEN_IOV_MAX}
- limits.90
{_POSIX_TIMER_MAX} [TMR]
The per-process number of timers.
Value: 32
- limits.91
{_POSIX_TRACE_EVENT_NAME_MAX} [TRC]
The length in bytes of a trace event name.
Value: 30
- limits.92
{_POSIX_TRACE_NAME_MAX} [TRC]
The length in bytes of a trace generation version string or a trace stream name.
Value: 8
- limits.93
{_POSIX_TRACE_SYS_MAX} [TRC]
The number of trace streams that may simultaneously exist in the system.
Value: 8
- limits.94
{_POSIX_TRACE_USER_EVENT_MAX} [TRC]
The number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefined user trace event POSIX_TRACE_UNNAMED_USER_EVENT.
Value: 32
- limits.95
{_POSIX_TTY_NAME_MAX} The size of the storage required for a terminal device name, in bytes, including the terminating null.
Value: 9
- limits.96
{_POSIX_TZNAME_MAX} Maximum number of bytes supported for the name of a timezone (not of the TZ variable).
Value: 6 Note: The length given by {_POSIX_TZNAME_MAX} does not include the quoting characters mentioned in Other Environment Variables.
- limits.98
{_POSIX2_BC_BASE_MAX} Maximum obase values allowed by the bc utility.
Value: 99
- limits.99
{_POSIX2_BC_DIM_MAX} Maximum number of elements permitted in an array by the bc utility.
Value: 2 048
- [+]locale (1 / 0 / 0)
- app.locale.bind_textdomain_codeset.08.01
shall not be changed or freed by the user.
- app.locale.bindtextdomain.11
Note: Applications that wish to use chdir() should always use absolute pathnames to avoid misadvertently selecting the wrong or non-existant directory.
- app.locale.bindtextdomain.12
The string
- app.locale.bindtextdomain.12.01
shall not be changed or freed by the user.
- app.locale.dcgettext.09
The resulting NULL-terminated string
- app.locale.dcgettext.09.01
must not be modified or freed.
- app.locale.dcngettext.11
The resulting NULL-terminated string
- app.locale.dcngettext.11.01
must not be modified or freed.
- app.locale.dgettext.08
The length of the string returned is undetermined until dgettext() is called.
- app.locale.dngettext.11
The resulting NULL-terminated string
- app.locale.dngettext.11.01
must not be modified or freed.
- app.locale.gettext.06
Applications shall not modify the string returned by gettext().
- app.locale.ngettext.09
Applications shall not modify the string returned by ngettext().
- locale.textdomain.01
Subsequent calls to gettext() and ngettext() use the default message domain.
- [+]lsb (3 / 0 / 0)
- lsb.strerror_r.01
The strerror_r() shall behave as specified in ISO POSIX (2003), except as described below.
- lsb.strerror_r.02
The strerror_r() function shall return a pointer to the string corresponding to errno.
On success, strerror_r() shall return a pointer to the generated message string (determined by the setting of the LC_MESSAGES category in the current locale).
- lsb.strerror_r.03 (struct)
The returned pointer may point within the buffer buf (at most buflen bytes).
- lsb.strerror_r.04
Otherwise, strerror_r() shall return the string corresponding to "Unknown error".
- [+]ncurses (4 / 0 / 0)
- ncurses.slk.01
The Curses interface manipulates the set of soft function-key labels that exist on many terminals.
- ncurses.slk.02
For those terminals that do not have soft labels, Curses takes over the bottom line of stdscr, reducing the size of stdscr and the value of the LINES external variable.
- ncurses.slk.03.count
There can be up to eight labels of up to eight display columns each.
- ncurses.slk.03.width
There can be up to eight labels of up to eight display columns each.
- [+]nlspath (1 / 0 / 0)
- nlspath.01
This variable shall contain a sequence of templates that the catopen() function uses when attempting to locate message catalogs.
- [+]pecho_wchar (5 / 0 / 0)
- pecho_wchar.01
The pechochar() and pecho_wchar() functions output one character to a pad and immediately refresh the pad.
- pecho_wchar.02
They are equivalent to a call to waddch() or wadd_wch(), respectively, followed by a call to prefresh().
- pecho_wchar.03
The last location of the pad on the screen is reused for the arguments to prefresh().
- pecho_wchar.04.01
Upon successful completion, these functions return OK.
- pecho_wchar.04.02
Otherwise, they return ERR.
- [+]process (3 / 0 / 0)
- process.context.01
The ucontext_t type that ucp points to defines the user context and includes the contents of the calling thread's machine registers, the signal mask, and the current execution stack.
- process.meta.nice.01
The default nice value is {NZERO}
- process.meta.nice.02
lower nice values shall cause more favorable scheduling
- [+]pselect (39 / 0 / 0)
- pselect.01
The pselect() function shall examine the file descriptor sets whose addresses are passed in the readfds, writefds, and errorfds parameters to see whether some of their descriptors are ready for reading, are ready for writing, or have an exceptional condition pending, respectively.
- app.pselect.02
The pselect() and select() functions shall support regular files, terminal and pseudo-terminal devices, [XSR] STREAMS-based files, FIFOs, pipes, and sockets. The behavior of pselect() and select() on file descriptors that refer to other types of file is unspecified.
- pselect.03 (struct)
The nfds argument specifies the range of descriptors to be tested.
- pselect.04
The first nfds descriptors shall be checked in each set; that is, the descriptors from zero through nfds-1 in the descriptor sets shall be examined.
- pselect.05
If the readfds argument is not a null pointer, it points to an object of type fd_set that on input specifies the file descriptors to be checked for being ready to read, and on output indicates which file descriptors are ready to read.
- pselect.06
If the writefds argument is not a null pointer, it points to an object of type fd_set that on input specifies the file descriptors to be checked for being ready to write, and on output indicates which file descriptors are ready to write.
- pselect.07
If the errorfds argument is not a null pointer, it points to an object of type fd_set that on input specifies the file descriptors to be checked for error conditions pending, and on output indicates which file descriptors have error conditions pending.
- pselect.08
Upon successful completion, the pselect() or select() function shall modify the objects pointed to by the readfds, writefds, and errorfds arguments to indicate which file descriptors are ready for reading, ready for writing, or have an error condition pending, respectively, and shall return the total number of ready descriptors in all the output sets.
- pselect.09
For each file descriptor less than nfds, the corresponding bit shall be set on successful completion if it was set on input and the associated condition is true for that file descriptor.
- pselect.10
If none of the selected descriptors are ready for the requested operation, the pselect() or select() function shall block until at least one of the requested operations becomes ready, until the timeout occurs, or until interrupted by a signal.
- pselect.11
The timeout parameter controls how long the pselect() or select() function shall take before timing out.
- pselect.12
If the timeout parameter is not a null pointer, it specifies a maximum interval to wait for the selection to complete.
- pselect.13
If the specified time interval expires without any requested operation becoming ready, the function shall return.
- pselect.14
If the timeout parameter is a null pointer, then the call to pselect() or select() shall block indefinitely until at least one descriptor meets the specified criteria.
- pselect.15 (struct)
To effect a poll, the timeout parameter should not be a null pointer, and should point to a zero-valued timespec structure.
- pselect.16
The use of a timeout does not affect any pending timers set up by alarm(), ualarm(), or setitimer().
- pselect.17 (struct)
Implementations may place limitations on the maximum timeout interval supported.
- pselect.20 (struct)
Implementations may also place limitations on the granularity of timeout intervals.
- pselect.22
If sigmask is not a null pointer, then the pselect() function shall replace the signal mask of the caller by the set of signals pointed to by sigmask before examining the descriptors, and shall restore the signal mask of the calling thread before returning.
- pselect.23 (struct)
A descriptor shall be considered ready for reading when a call to an input function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully.
- pselect.24 (struct)
The function might return data, an end-of-file indication, or an error other than one indicating that it is blocked, and in each of these cases the descriptor shall be considered ready for reading.
- pselect.25 (struct)
A descriptor shall be considered ready for writing when a call to an output function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully.
- pselect.26
If a socket has a pending error, it shall be considered to have an exceptional condition pending.
- pselect.27
Otherwise, what constitutes an exceptional condition is file type-specific.
- pselect.28
For a file descriptor for use with a socket, it is protocol-specific except as noted below. For other file types it is implementation-defined.
- pselect.29
If the operation is meaningless for a particular file type, pselect() or select() shall indicate that the descriptor is ready for read or write operations, and shall indicate that the descriptor has no exceptional condition pending.
- pselect.30
If a descriptor refers to a socket, the implied input function is the recvmsg() function with parameters requesting normal and ancillary data, such that the presence of either type shall cause the socket to be marked as readable.
- pselect.31
The presence of out-of-band data shall be checked if the socket option SO_OOBINLINE has been enabled, as out-of-band data is enqueued with normal data.
- pselect.32
If the socket is currently listening, then it shall be marked as readable if an incoming connection request has been received, and a call to the accept() function shall complete without blocking.
- pselect.33
If a descriptor refers to a socket, the implied output function is the sendmsg() function supplying an amount of normal data equal to the current value of the SO_SNDLOWAT option for the socket.
- pselect.34
If a non-blocking call to the connect() function has been made for a socket, and the connection attempt has either succeeded or failed leaving a pending error, the socket shall be marked as writable.
- pselect.35
A socket shall be considered to have an exceptional condition pending if a receive operation with O_NONBLOCK clear for the open file description and with the MSG_OOB flag set would return out-of-band data without blocking.
- pselect.36
It is protocol-specific whether the MSG_OOB flag would be used to read out-of-band data.
- pselect.37
A socket shall also be considered to have an exceptional condition pending if an out-of-band data mark is present in the receive queue.
- pselect.38
Other circumstances under which a socket may be considered to have an exceptional condition pending are protocol-specific and implementation-defined.
- pselect.39
If the readfds, writefds, and errorfds arguments are all null pointers and the timeout argument is not a null pointer, the pselect() or select() function shall block for the time specified, or until interrupted by a signal.
- pselect.40
If the readfds, writefds, and errorfds arguments are all null pointers and the timeout argument is a null pointer, the pselect() or select() function shall block until interrupted by a signal.
- pselect.41
File descriptors associated with regular files shall always select true for ready to read, ready to write, and error conditions.
- pselect.42
On failure, the objects pointed to by the readfds, writefds, and errorfds arguments shall not be modified.
- pselect.43
If the timeout interval expires without the specified condition being true for any of the specified file descriptors, the objects pointed to by the readfds, writefds, and errorfds arguments shall have all bits set to 0.
- pselect.44.01
Upon successful completion, the pselect() and select() functions shall return the total number of bits set in the bit masks.
- pselect.44.02
Otherwise, -1 shall be returned, and errno shall be set to indicate the error.
- pselect.45
Under the following conditions, pselect() and select() shall fail and set errno to:
- pselect.45.01
[EBADF] One or more of the file descriptor sets specified a file descriptor that is not a valid open file descriptor.
- pselect.45.02
[EINTR] The function was interrupted before any of the selected events occurred and before the timeout interval expired. [XSI] If SA_RESTART has been set for the interrupting signal, it is implementation-defined whether the function restarts or returns with [EINTR].
- pselect.45.03
[EINVAL] An invalid timeout interval was specified.
- pselect.45.04
[EINVAL] The nfds argument is less than 0 or greater than FD_SETSIZE.
- pselect.45.05
[EINVAL] [XSR] One of the specified file descriptors refers to a STREAM or multiplexer that is linked (directly or indirectly) downstream from a multiplexer.
- [+]pthread (2 / 0 / 0)
- pthread.cond.01
After a condition variable attributes object has been used to initialize one or more condition variables, any function affecting the attributes object (including destruction) shall not affect any previously initialized condition variables.
- app.pthread.cond.condattr.01
A destroyed attr attributes object can be reinitialized using pthread_condattr_init();
- app.pthread.cond.condattr.02
the results of otherwise referencing the object after it has been destroyed are undefined.
- pthread.rwlock.01
After a read-write lock attributes object has been used to initialize one or more read-write locks, any function affecting the attributes object (including destruction) shall not affect any previously initialized read-write locks.
- app.pthread.rwlock.rwlock.01.rdlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.01.timedrdlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.01.timedwrlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.01.tryrdlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.01.trywrlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.01.unlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.01.wrlock
The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init().
- app.pthread.rwlock.rwlock.02.01.rdlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.01.timedrdlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.01.timedwrlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.01.tryrdlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.01.trywrlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.01.unlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.01.wrlock
Results are undefined if a read-write lock is used without first being initialized.
- app.pthread.rwlock.rwlock.02.rdlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.02.timedrdlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.02.timedwrlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.02.tryrdlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.02.trywrlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.02.unlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.02.wrlock
Once initialized, the lock can be used any number of times without being reinitialized.
- app.pthread.rwlock.rwlock.03.rdlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlock.03.timedrdlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlock.03.timedwrlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlock.03.tryrdlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlock.03.trywrlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlock.03.unlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlock.03.wrlock
Only the object referenced by rwlock may be used for performing synchronization. The result of referring to copies of that object in calls to pthread_rwlock_destroy(), pthread_rwlock_rdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_timedwrlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.
- app.pthread.rwlock.rwlockattr.01
A destroyed attr attributes object can be reinitialized using pthread_rwlockattr_init();
- app.pthread.rwlock.rwlockattr.02
the results of otherwise referencing the object after it has been destroyed are undefined.
- [+]pthread_cleanup (3 / 1 / 0)
- pthread_cleanup.01
The cancellation cleanup handler shall be popped from the cancellation cleanup stack and invoked with the argument arg when:
- pthread_cleanup.01.01
The thread exits (that is, calls pthread_exit()).
- pthread_cleanup.01.02
The thread acts upon a cancellation request.
- pthread_cleanup.01.03
The thread calls pthread_cleanup_pop() with a non-zero execute argument.
- [+]pthread_mutex (1 / 0 / 0)
- app.pthread_mutex.01
Only mutex itself may be used for performing synchronization. The result of referring to copies of mutex in calls to pthread_mutex_lock(), pthread_mutex_trylock(), pthread_mutex_unlock(), and pthread_mutex_destroy() is undefined.
- pthread_mutex.02
An implementation may map this mutex to one of the other mutex types.
- [+]pthread_mutex_static_init (1 / 1 / 0)
- pthread_mutex_static_init.01
In cases where default mutex attributes are appropriate, the macro PTHREAD_MUTEX_INITIALIZER can be used to initialize mutexes that are statically allocated. The effect shall be equivalent to dynamic initialization by a call to pthread_mutex_init() with parameter attr specified as NULL, except that no error checks are performed.
- [+]pthread_mutexattr (6 / 1 / 0)
- pthread_mutexattr.01
After a mutex attributes object has been used to initialize one or more mutexes, any function affecting the attributes object (including destruction) shall not affect any previously initialized mutexes.
- pthread_mutexattr.02
The process-shared attribute is set to PTHREAD_PROCESS_SHARED to permit a mutex to be operated upon by any thread that has access to the memory where the mutex is allocated, even if the mutex is allocated in memory that is shared by multiple processes.
- pthread_mutexattr.03.01
If the process-shared attribute is PTHREAD_PROCESS_PRIVATE, the mutex shall only be operated upon by threads created within the same process as the thread that initialized the mutex;
- pthread_mutexattr.03.02
if threads of differing processes attempt to operate on such a mutex, the behavior is undefined.
- pthread_mutexattr.04
The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE.
- pthread_mutexattr.05
The default value of the type attribute is PTHREAD_MUTEX_DEFAULT.
- [+]rendition (6 / 0 / 0)
- rendition.01
When the application adds or inserts characters into a window, the effect is as follows:
- rendition.01.01
If the character is not the space character, then the window receives:
- rendition.01.01.01
the character that the application specifies
- rendition.01.01.02
the colour that the application specifies; or the window colour, if the application does not specify a colour
- rendition.01.01.03
the attributes specified, OR-ed with the window attributes.
- rendition.01.02
If the character is the space character, then the window receives:
- rendition.01.02.01
the background character
- rendition.01.02.02
the colour that the application specifies; or the window colour, if the application does not specify a colour
- rendition.01.02.03
the attributes specified, OR-ed with the window attributes.
- [+]return_from_main (25 / 3 / 0)
- return_from_main.01
The exit() function shall first call all functions registered by atexit(), in the reverse order of their registration, except that a function is called after any previously registered functions that had already been called at the time it was registered. Each function is called as many times as it was registered.
- return_from_main.02
If a function registered by a call to atexit() fails to return, the remaining registered functions shall not be called and the rest of the exit() processing shall not be completed.
- return_from_main.03
The exit() function shall then flush all open streams with unwritten buffered data, close all open streams, and remove all files created by tmpfile().
- return_from_main.04
These functions shall terminate the calling process [CX] with the following consequences:
- return_from_main.04.01
All of the file descriptors, directory streams, [XSI] conversion descriptors, and message catalog descriptors open in the calling process shall be closed.
- return_from_main.04.02
If the parent process of the calling process is executing a wait() or waitpid(), [XSI] and has neither set its SA_NOCLDWAIT flag nor set SIGCHLD to SIG_IGN, it shall be notified of the calling process' termination and the low-order eight bits (that is, bits 0377) of status shall be made available to it. If the parent is not waiting, the child's status shall be made available to it when the parent subsequently executes wait() or waitpid().
- return_from_main.04.03
If the parent process of the calling process is not executing a wait() or waitpid(), [XSI] and has neither set its SA_NOCLDWAIT flag nor set SIGCHLD to SIG_IGN, the calling process shall be transformed into a zombie process. A zombie process is an inactive process and it shall be deleted at some later time when its parent process executes wait() or waitpid().
- return_from_main.04.04
Termination of a process does not directly terminate its children. The sending of a SIGHUP signal as described below indirectly terminates children in some circumstances.
- return_from_main.04.05
The parent process ID of all of the calling process' existing child processes and zombie processes shall be set to the process ID of an implementation-defined system process. That is, these processes shall be inherited by a special system process.
- return_from_main.04.06
[XSI] Each attached shared-memory segment is detached and the value of shm_nattch (see shmget()) in the data structure associated with its shared memory ID shall be decremented by 1.
- return_from_main.04.07
[XSI] For each semaphore for which the calling process has set a semadj value (see semop() ), that value shall be added to the semval of the specified semaphore.
- return_from_main.04.08
If the process is a controlling process, the SIGHUP signal shall be sent to each process in the foreground process group of the controlling terminal belonging to the calling process.
- return_from_main.04.09
If the process is a controlling process, the controlling terminal associated with the session shall be disassociated from the session, allowing it to be acquired by a new controlling process.
- return_from_main.04.10
If the exit of the process causes a process group to become orphaned, and if any member of the newly-orphaned process group is stopped, then a SIGHUP signal followed by a SIGCONT signal shall be sent to each process in the newly-orphaned process group.
- return_from_main.04.11
[SEM] All open named semaphores in the calling process shall be closed as if by appropriate calls to sem_close().
- return_from_main.04.12
[ML] Any memory locks established by the process via calls to mlockall() or mlock() shall be removed. If locked pages in the address space of the calling process are also mapped into the address spaces of other processes and are locked by those processes, the locks established by the other processes shall be unaffected by the call by this process to _Exit() or _exit().
- return_from_main.04.13
[MF|SHM] Memory mappings that were created in the process shall be unmapped before the process is destroyed.
- return_from_main.04.14
[TYM] Any blocks of typed memory that were mapped in the calling process shall be unmapped, as if munmap() was implicitly called to unmap them.
- return_from_main.04.15
[MSG] All open message queue descriptors in the calling process shall be closed as if by appropriate calls to mq_close().
- return_from_main.04.16
[AIO] Any outstanding cancelable asynchronous I/O operations may be canceled. Those asynchronous I/O operations that are not canceled shall complete as if the _Exit() or _exit() operation had not yet occurred, but any associated signal notifications shall be suppressed. The _Exit() or _exit() operation may block awaiting such I/O completion. Whether any I/O is canceled, and which I/O may be canceled upon _Exit() or _exit(), is implementation-defined.
- return_from_main.04.18
[TRC] If the calling process is a trace controller process, any trace streams that were created by the calling process shall be shut down as described by the posix_trace_shutdown() function, and any process' mapping of trace event names to trace event type identifiers built for these trace streams may be deallocated.
- return_from_main.04.19.01
If the implementation supports the SIGCHLD signal, a SIGCHLD shall be sent to the parent process.
- return_from_main.04.19.02
If the parent process has set its SA_NOCLDWAIT flag, or set SIGCHLD to SIG_IGN, the status shall be discarded, and the lifetime of the calling process shall end immediately.
- return_from_main.04.19.03
If SA_NOCLDWAIT is set, it is implementation-defined whether a SIGCHLD signal is sent to the parent process.
- return_from_main.05
These functions do not return.
- return_from_main.06
The value of status may be 0, EXIT_SUCCESS, EXIT_FAILURE, [CX] or any other value, though only the least significant 8 bits (that is, status & 0377) shall be available to a waiting parent process.
- [+]scrolling (11 / 0 / 0)
- scrolling.01
If the application specifies a character or a string of characters such that writing them to a window would extend beyond the end of the line (for example, if the application tries to deposit any multi-column character at the last column in a line), the behaviour depends on whether the function supports line wrapping:
- scrolling.01.01
If the function does not wrap, it fails.
- scrolling.01.02
If the function wraps, then it places one or more characters in the window at the start of the next line, beginning with the first character that would not completely fit on the original line.
- scrolling.01.03
If the final character on the line is a multi-column character that does not completely fit on the line, the entire character wraps to the next line and columns at the end of the original line may be orphaned.
- scrolling.01.04
If the original line was the last line in the window, the wrap may cause a scroll to occur:
- scrolling.01.04.01
If scrolling is enabled, a scroll occurs.
- scrolling.01.04.02
The contents of the first line of the window are lost.
- scrolling.01.04.03
The contents of each remaining line in the window move to the previous line.
- scrolling.01.04.04
The last line of the window is filled with any characters that wrapped.
- scrolling.01.04.05
Any remaining space on the last line is filled with the background character and rendition.
- scrolling.01.04.06
If scrolling is disabled, any characters that would extend beyond the last column of the last line are truncated.
- scrolling.02
Some add functions move the cursor just beyond the end of the last character added.
- scrolling.03
If this position is beyond the end of a line, it causes wrapping and scrolling under the conditions specified in the second bullet above.
- [+]setjmp (3 / 0 / 0)
- app.setjmp.01
If a macro definition is suppressed in order to access an actual function, or a program defines an external identifier with the name setjmp, the behavior is undefined.
- setjmp.01
A call to setjmp() shall save the calling environment in its env argument for later use by longjmp().
- app.setjmp.02
An application shall ensure that an invocation of setjmp() appears in one of the following contexts only:
- app.setjmp.02.01
The entire controlling expression of a selection or iteration statement
- app.setjmp.02.02
One operand of a relational or equality operator with the other operand an integral constant expression, with the resulting expression being the entire controlling expression of a selection or iteration statement
- app.setjmp.02.03
The operand of a unary '!' operator with the resulting expression being the entire controlling expression of a selection or iteration
- app.setjmp.02.04
The entire expression of an expression statement (possibly cast to void)
- setjmp.02
It is unspecified whether setjmp() is a macro or a function.
- setjmp.04
If the return is from a direct invocation, setjmp() shall return 0. If the return is from a call to longjmp(), setjmp() shall return a non-zero value.
- [+]sh (59 / 15 / 0)
- sh.pattern.filename.01
The rules described so far in Patterns Matching a Single Character and Patterns Matching Multiple Characters are qualified by the following rules that apply when pattern matching notation is used for filename expansion:
- sh.pattern.filename.01.01.01
The slash character in a pathname shall be explicitly matched by using one or more slashes in the pattern; it shall neither be matched by the asterisk or question-mark special characters nor by a bracket expression.
- sh.pattern.filename.01.01.02
Slashes in the pattern shall be identified before bracket expressions; thus, a slash cannot be included in a pattern bracket expression used for filename expansion.
- sh.pattern.filename.01.01.03
If a slash character is found following an unescaped open square bracket character before a corresponding closing square bracket is found, the open bracket shall be treated as an ordinary character.
- sh.pattern.filename.01.02.01
If a filename begins with a period ( '.' ), the period shall be explicitly matched by using a period as the first character of the pattern or immediately following a slash character.
- sh.pattern.filename.01.02.02
The leading period shall not be matched by:
- sh.pattern.filename.01.02.02.01
The asterisk or question-mark special characters
- sh.pattern.filename.01.02.02.02
A bracket expression containing a non-matching list, such as "[!a]", a range expression, such as "[%-0]", or a character class expression, such as "[[:punct:]]"
- sh.pattern.filename.01.02.03
It is unspecified whether an explicit period in a bracket expression matching list, such as "[.abc]", can match a leading period in a filename.
- sh.pattern.filename.01.03.01
Specified patterns shall be matched against existing filenames and pathnames, as appropriate.
- sh.pattern.filename.01.03.02
Each component that contains a pattern character shall require read permission in the directory containing that component.
In order to have access to a pathname, glob() requires search permission on every component of a path except the last, and read permission on each directory of any filename component of pattern that contains any of the following special characters: '*', '?', and '['.
- sh.pattern.filename.01.03.03
Any component, except the last, that does not contain a pattern character shall require search permission.
In order to have access to a pathname, glob() requires search permission on every component of a path except the last, and read permission on each directory of any filename component of pattern that contains any of the following special characters: '*', '?', and '['.
- sh.pattern.multiple.01
The following rules are used to construct patterns matching multiple characters from patterns matching a single character:
- sh.pattern.multiple.01.01
The asterisk ( '*' ) is a pattern that shall match any string, including the null string.
* An asterisk is a pattern that shall match multiple characters, as described in Patterns Matching Multiple Characters.
- sh.pattern.multiple.01.02
The concatenation of patterns matching a single character is a valid pattern that shall match the concatenation of the single characters or collating elements matched by each of the concatenated patterns.
- sh.pattern.multiple.01.03
The concatenation of one or more patterns matching a single character with one or more asterisks is a valid pattern. In such patterns, each asterisk shall match a string of zero or more characters, matching the greatest possible number of characters that still allows the remainder of the pattern to match the string.
- sh.pattern.single.01
A backslash character shall escape the following character.
- sh.pattern.single.02
The escaping backslash shall be discarded.
- sh.pattern.single.03
An ordinary character is a pattern that shall match itself.
- sh.pattern.single.04
Matching shall be based on the bit pattern used for encoding the character, not on the graphic representation of the character.
- sh.pattern.single.05
If any character (ordinary, shell special, or pattern special) is quoted, that pattern shall match the character itself.
- sh.pattern.single.06
The shell special characters always require quoting.
- sh.pattern.single.07
When unquoted and outside a bracket expression, the following three characters shall have special meaning in the specification of patterns:
- sh.pattern.single.07.01
? A question-mark is a pattern that shall match any character.
- sh.pattern.single.07.02
[ The open bracket shall introduce a pattern bracket expression.
- app.sh.wordexp.command.01
a conforming application shall separate the "$(" and '(' into two tokens (that is, separate them with white space). This is required to avoid any ambiguities with arithmetic expansion.
- app.sh.wordexp.parameter.01
If parameter is '*' or '@', the result of the expansion is unspecified.
Only variables, not positional parameters or special parameters, can be assigned in this way.
- app.sh.wordexp.tilde.01
If HOME is unset, the results are unspecified.
- app.sh.wordexp.tilde.02
If the system does not recognize the login name, the results are undefined.
- sh.wordexp.arithmetic.01
The shell shall expand all tokens in the expression for parameter expansion, command substitution, and quote removal.
- sh.wordexp.arithmetic.02
Next, the shell shall treat this as an arithmetic expression and substitute the value of the expression.
- sh.wordexp.arithmetic.03
All changes to variables in an arithmetic expression shall be in effect after the arithmetic expansion, as in the parameter expansion "${x=value}".
- sh.wordexp.command.01
The shell shall expand the command substitution by executing command in a subshell environment (see Shell Execution Environment) and replacing the command substitution (the text of command plus the enclosing "$()" or backquotes) with the standard output of the command, removing sequences of one or more <newline>s at the end of the substitution.
- sh.wordexp.command.02
Embedded <newline>s before the end of the output shall not be removed;
- sh.wordexp.command.03
The results of command substitution shall not be processed for further tilde expansion, parameter expansion, command substitution, or arithmetic expansion.
- sh.wordexp.command.04
If a command substitution occurs inside double-quotes, field splitting and pathname expansion shall not be performed on the results of the substitution.
- sh.wordexp.field.01
If the value of IFS is a <space>, <tab>, and <newline>, or if it is unset, any sequence of <space>s, <tab>s, or <newline>s at the beginning or end of the input shall be ignored and any sequence of those characters within the input shall delimit a field.
- sh.wordexp.field.02
If the value of IFS is null, no field splitting shall be performed.
- sh.wordexp.field.03
Otherwise, the following rules shall be applied in sequence. The term " IFS white space" is used to mean any sequence (zero or more instances) of white space characters that are in the IFS value (for example, if IFS contains <space>/ <comma>/ <tab>, any sequence of <space>s and <tab>s is considered IFS white space).
- sh.wordexp.field.03.01
IFS white space shall be ignored at the beginning and end of the input.
- sh.wordexp.field.03.02
Each occurrence in the input of an IFS character that is not IFS white space, along with any adjacent IFS white space, shall delimit a field, as described previously.
- sh.wordexp.field.03.03
Non-zero-length IFS white space shall delimit a field.
- sh.wordexp.parameter.01
The value, if any, of parameter shall be substituted.
- sh.wordexp.parameter.02.01
${parameter:-word}substitute parametersubstitute wordsubstitute word
If parameter is unset or null, the expansion of word shall be substituted;
- sh.wordexp.parameter.02.02
${parameter:-word}substitute parametersubstitute wordsubstitute word
otherwise, the value of parameter shall be substituted.
- sh.wordexp.parameter.03.01
${parameter:=word}substitute parameterassign wordassign word
If parameter is unset or null, the expansion of word shall be assigned to parameter.
In all cases, the final value of parameter shall be substituted.
- sh.wordexp.parameter.03.02
${parameter:=word}substitute parameterassign wordassign word
- sh.wordexp.parameter.04.01
${parameter:?word}substitute parametererror, exiterror, exit
If parameter is unset or null, the expansion of word (or a message indicating it is unset if word is omitted) shall be written to standard error and the shell exits with a non-zero exit status.
- sh.wordexp.parameter.04.02
${parameter:?word}substitute parametererror, exiterror, exit
Otherwise, the value of parameter shall be substituted. An interactive shell need not exit.
- sh.wordexp.parameter.05.01
${parameter:+word}substitute wordsubstitute nullsubstitute null
If parameter is unset or null, null shall be substituted;
otherwise, the expansion of word shall be substituted.
- sh.wordexp.parameter.05.02
${parameter:+word}substitute wordsubstitute nullsubstitute null
- sh.wordexp.parameter.06.01
${parameter-word}substitute parametersubstitute nullsubstitute word
- sh.wordexp.parameter.06.02
${parameter-word}substitute parametersubstitute nullsubstitute word
- sh.wordexp.parameter.07.01
${parameter=word}substitute parametersubstitute nullassign word
- sh.wordexp.parameter.07.02
${parameter=word}substitute parametersubstitute nullassign word
- sh.wordexp.parameter.08.01
${parameter?word}substitute parametersubstitute nullerror, exit
- sh.wordexp.parameter.08.02
${parameter?word}substitute parametersubstitute nullerror, exit
- sh.wordexp.parameter.09.01
${parameter+word}substitute wordsubstitute wordsubstitute null
- sh.wordexp.parameter.09.02
${parameter+word}substitute wordsubstitute wordsubstitute null
- sh.wordexp.parameter.10
The length in characters of the value of parameter shall be substituted.
- sh.wordexp.parameter.11
${parameter%word} Remove Smallest Suffix Pattern. The word shall be expanded to produce a pattern. The parameter expansion shall then result in parameter, with the smallest portion of the suffix matched by the pattern deleted.
- sh.wordexp.parameter.12
${parameter%%word} Remove Largest Suffix Pattern. The word shall be expanded to produce a pattern. The parameter expansion shall then result in parameter, with the largest portion of the suffix matched by the pattern deleted.
- sh.wordexp.parameter.13
${parameter#word} Remove Smallest Prefix Pattern. The word shall be expanded to produce a pattern. The parameter expansion shall then result in parameter, with the smallest portion of the prefix matched by the pattern deleted.
- sh.wordexp.parameter.14
${parameter##word} Remove Largest Prefix Pattern. The word shall be expanded to produce a pattern. The parameter expansion shall then result in parameter, with the largest portion of the prefix matched by the pattern deleted.
- sh.wordexp.pathname.01
After field splitting, if set -f is not in effect, each field in the resulting command line shall be expanded using the algorithm described in Pattern Matching Notation , qualified by the rules in Patterns Used for Filename Expansion.
- sh.wordexp.quote.01
The quote characters: '\', '", and '' (backslash, single-quote, double-quote) that were present in the original word shall be removed unless they have themselves been quoted.
- sh.wordexp.tilde.01
If the login name is null (that is, the tilde-prefix contains only the tilde), the tilde-prefix is replaced by the value of the variable HOME .
- sh.wordexp.tilde.02
Otherwise, the tilde-prefix shall be replaced by a pathname of the initial working directory associated with the login name obtained using the getpwnam() function as defined in the System Interfaces volume of IEEE Std 1003.1-2001.
- [+]sigsetjmp (3 / 0 / 0)
- sigsetjmp.01
A call to setjmp() shall save the calling environment in its env argument for later use by longjmp().
References to setjmp() are equivalent to sigsetjmp().References to longjmp() are equivalent to siglongjmp().
- app.sigsetjmp.02
An application shall ensure that an invocation of setjmp() appears in one of the following contexts only:
- app.sigsetjmp.02.01
The entire controlling expression of a selection or iteration statement
- app.sigsetjmp.02.02
One operand of a relational or equality operator with the other operand an integral constant expression, with the resulting expression being the entire controlling expression of a selection or iteration statement
- app.sigsetjmp.02.03
The operand of a unary '!' operator with the resulting expression being the entire controlling expression of a selection or iteration
- app.sigsetjmp.02.04
The entire expression of an expression statement (possibly cast to void)
- sigsetjmp.04
If the return is from a successful direct invocation, sigsetjmp() shall return 0. If the return is from a call to siglongjmp(), sigsetjmp() shall return a non-zero value.
- sigsetjmp.07
The sigsetjmp() function shall be equivalent to the setjmp() function, except as follows:
- sigsetjmp.07.01
If the value of the savemask argument is not 0, sigsetjmp() shall also save the current signal mask of the calling thread as part of the calling environment.
- [+]socket_netdb (1 / 0 / 0)
- socket_netdb.01
This information is considered to be stored in a database that can be accessed sequentially or randomly. The implementation of this database is unspecified.
This information is considered to be stored in a database that can be accessed sequentially or randomly. Implementation of this database is unspecified.
- [+]sockio (39 / 3 / 0)
- sockio.01
Socket ioctl() commands are a subset of the ioctl() calls, which can perform a variety of functions on sockets.
Generalizes:
- sockio.02
- sockio.03
- sockio.04.01.01
- sockio.04.01.02
- sockio.04.01.03
- sockio.04.01.04
- sockio.04.01.05
- sockio.04.01.06
- sockio.04.02.01
- sockio.04.02.02
- sockio.04.02.03
- sockio.04.02.04
- sockio.04.03.01
- sockio.04.03.02
- sockio.04.03.03
- sockio.04.03.04
- sockio.04.04.01
- sockio.04.04.02
- sockio.04.04.03
- sockio.04.04.04
- sockio.04.05.01
- sockio.04.05.02
- sockio.04.05.03
- sockio.04.05.04
- sockio.04.06.01
- sockio.04.06.02
- sockio.04.06.03
- sockio.04.06.04
- sockio.04.07.01
- sockio.04.07.02
- sockio.05.01
- sockio.05.02
- sockio.05.03
- sockio.06.01
- sockio.06.02
- sockio.06.03
- sockio.06.04
- sockio.06.05
- sockio.02
sockfd shall be an open file descriptor referring to a socket
- sockio.03
Socket ioctl() commands apply to the underlying network interfaces, and affect the entire system, not just the file descriptor used to issue the ioctl().
- sockio.04
The following values for request are accepted:
- sockio.04.01
SIOCGIFCONF (Deprecated)
- sockio.04.01.01
Get the interface configuration list for the system.
- sockio.04.01.02
argp shall point to a ifconf structure, as described in <net/if.h>.
- sockio.04.01.03
Before calling, the caller shall set the ifc_ifcu.ifcu_req field to point to an array of ifreq structures, and set ifc_len to the size in bytes of this allocated array.
- sockio.04.01.04
Upon return, ifc_len will contain the size in bytes of the array which was actually used.
- sockio.04.01.05
If it is the same as the length upon calling, the caller should assume that the array was too small and try again with a larger array.
- sockio.04.01.06
On success, SIOCGIFCONF shall return a nonnegative value.
- sockio.04.02
SIOCGIFFLAGS
- sockio.04.02.01
Get the interface flags for the indicated interface.
- sockio.04.02.02
argp shall point to a ifreq structure.
- sockio.04.02.03
Before calling, the caller should fill in the ifr_name field with the interface name,
- sockio.04.02.04
and upon return, the ifr_ifru.ifru_flags field is set with the interface flags.
- sockio.04.03
SIOCGIFADDR
- sockio.04.03.01
Get the interface address for the given interface.
- sockio.04.03.02
argp shall point to a ifreq structure.
- sockio.04.03.03
Before calling, the caller should fill in the ifr_name field with the interface name,
- sockio.04.03.04
and upon return, the ifr_ifru.ifru_addr field is set with the interface address.
- sockio.04.04
SIOCGIFBRDADDR
- sockio.04.04.01
Get the interface broadcast address for the given interface.
- sockio.04.04.02
argp shall point to a ifreq structure.
- sockio.04.04.03
Before calling, the caller should fill in the ifr_name field with the interface name,
- sockio.04.04.04
and upon return, the ifr_ifru.ifru_broadcast field is set with the interface broadcast address.
- sockio.04.05
SIOCGIFNETMASK
- sockio.04.05.01
Get the network mask for the given interface.
- sockio.04.05.02
argp shall point to a ifreq structure.
- sockio.04.05.03
Before calling, the caller should fill in the ifr_name field with the interface name,
- sockio.04.05.04
and upon return, the ifr_ifru.ifru_netmask field is set with the network mask.
- sockio.04.06
SIOCGIFMTU
- sockio.04.06.01
Get the Maximum Transmission Unit (MTU) size for the given interface.
- sockio.04.06.02
argp shall point to a ifreq structure.
- sockio.04.06.03
Before calling, the caller should fill in the ifr_name field with the interface name,
- sockio.04.06.04
and upon return, the ifr_ifru.ifru_mtu field is set with the MTU.
- sockio.04.07
FIONREAD
- sockio.04.07.01
Get the amount of queued unread data in the receive buffer.
- sockio.04.07.02
argp shall point to an integer where the result is to be placed.
- sockio.05.01
On success, if request is SIOCGIFCONF, a non-negative integer shall be returned.
- sockio.05.02
If request is not SIOCGIFCONF, on success 0 is returned.
- sockio.05.03
On error, -1 is returned and the global variable errno is set appropriately.
- sockio.06.01
[EBADF] sockfd is not a valid descriptor.
- sockio.06.02
[EFAULT] argp references an inaccessible memory area.
- sockio.06.03
[ENOTTY] The specified request does not apply to the kind of object that the descriptor sockfd references.
- sockio.06.04
[EINVAL] Either request or argp is invalid.
- sockio.06.05
[ENOTCONN] The operation is only defined on a connected socket, but the socket wasn't connected.
- [+]special (14 / 0 / 0)
- special.01
In functions that do not move the cursor based on the information placed in the window, these special characters would only be used within a string in order to affect the placement of subsequent characters; the cursor movement specified below does not persist in the visible cursor beyond the end of the operation.
- special.02
In functions that do move the cursor, these special characters can be used to affect the placement of subsequent characters and to achieve movement of the visible cursor.
- special.03
<backspace>
- special.03.01
Unless the cursor was already in column 0, <backspace> moves the cursor one column toward the start of the current line and any characters after the <backspace> are added or inserted starting there.
- special.04
<carriage return>
- special.04.01
Unless the cursor was already in column 0, <carriage return> moves the cursor to the start of the current line. Any characters after the <carriage return> are added or inserted starting there.
- special.05
<newline>
- special.05.01
In an add operation, Curses adds the background character into successive columns until reaching the end of the line.
- special.05.02
Scrolling occurs as described in Truncation, Wrapping and Scrolling .
- special.05.03
Any characters after the <newline> character are added, starting at the start of the new line.
- special.05.04
In an insert operation, <newline> erases the remainder of the current line with the background character, effectively a wclrtoeol(), and moves the cursor to the start of a new line.
- special.05.05
When scrolling is enabled, advancing the cursor to a new line may cause scrolling as described in Truncation, Wrapping and Scrolling .
- special.05.06
Any characters after the <newline> character are inserted at the start of the new line.
- special.06
<tab>
- special.06.01
Tab characters in text move subsequent characters to the next horizontal tab stop.
- special.06.02
By default, tab stops are in column 0, 8, 16, and so on.
- special.06.03
In an insert or add operation, Curses inserts or adds, respectively, the background character into successive columns until reaching the next tab stop
- special.06.04
If there are no more tab stops in the current line, wrapping and scrolling occur as described in Truncation, Wrapping and Scrolling .
- [+]sys_siglist (1 / 0 / 0)
- sys_siglist.01
The array sys_siglist holds the signal description strings indexed by signal number
The array sys_siglist holds the signal description strings indexed by signal number.
- app.sys_siglist.02
This array should not be accessed directly by applications
- [+]term_attrs (2 / 0 / 0)
- term_attrs.01
The term_attrs() function extracts information for the video attributes of the current terminal which is supported for a cchar_t
- term_attrs.02
The term_attrs() function returns a logical OR of WA_ values of all video attributes supported by the terminal.
- [+]ttyio_TIOCGWINSZ (6 / 3 / 0)
- ttyio_TIOCGWINSZ.01
Get the size attributes of the terminal or pseudo-terminal identified by fd.
- ttyio_TIOCGWINSZ.01.01
On return, the structure will have ws_row set to the number of rows of text (i.e. lines of text) that can be viewed on the device,
- ttyio_TIOCGWINSZ.01.02
and ws_col set to the number of columns (i.e. text width).
- app.ttyio_TIOCGWINSZ.01
On entry, argp shall reference a winsize structure.
- ttyio_TIOCGWINSZ.02
On success, 0 is returned.
- ttyio_TIOCGWINSZ.03
On error, -1 is returned and the global variable errno is set appropriately.
- ttyio_TIOCGWINSZ.03.01
[EBADF] fd is not a valid descriptor.
- ttyio_TIOCGWINSZ.03.02
[EFAULT] argp references an inaccessible memory area.
- ttyio_TIOCGWINSZ.03.03
[EINVAL] request and argp are not valid.
- [+]unget_wch (3 / 0 / 0)
- unget_wch.01
The unget_wch() function pushes the wide character wch onto the head of the input queue.
- app.unget_wch.02
One character of push-back is guaranteed. The result of successive calls without an intervening call to getch() or get_wch() are unspecified.
- unget_wch.03.01
Upon successful completion, these functions return OK.
- unget_wch.03.02
Otherwise, they return ERR.
- [+]unistd (85 / 75 / 0)
- unistd.01
_POSIX_ADVISORY_INFO [ADV]
The implementation supports the Advisory Information option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.02
_POSIX_ASYNCHRONOUS_IO [AIO]
The implementation supports the Asynchronous Input and Output option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.03
_POSIX_BARRIERS [BAR]
The implementation supports the Barriers option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.04
_POSIX_CHOWN_RESTRICTED The use of chown() and fchown() is restricted to a process with appropriate privileges, and to changing the group ID of a file only to the effective group ID of the process or to one of its supplementary group IDs. This symbol shall either be undefined or defined with a value other than -1.
- unistd.05
_POSIX_CLOCK_SELECTION [CS]
The implementation supports the Clock Selection option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.06
_POSIX_CPUTIME [CPT]
The implementation supports the Process CPU-Time Clocks option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.07
_POSIX_FSYNC [FSC]
The implementation supports the File Synchronization option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.08
_POSIX_IPV6 The implementation supports the IPv6 option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.09
_POSIX_JOB_CONTROL The implementation supports job control. This symbol shall always be set to a value greater than zero.
- unistd.10
_POSIX_MAPPED_FILES [MF]
The implementation supports the Memory Mapped Files option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.11
_POSIX_MEMLOCK [ML]
The implementation supports the Process Memory Locking option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.12
_POSIX_MEMLOCK_RANGE [MR]
The implementation supports the Range Memory Locking option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.13
_POSIX_MEMORY_PROTECTION [MPR]
The implementation supports the Memory Protection option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.14
_POSIX_MESSAGE_PASSING [MSG]
The implementation supports the Message Passing option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.15
_POSIX_MONOTONIC_CLOCK [MON]
The implementation supports the Monotonic Clock option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.16
_POSIX_NO_TRUNC Pathname components longer than {NAME_MAX} generate an error. This symbol shall either be undefined or defined with a value other than -1.
- unistd.17
_POSIX_PRIORITIZED_IO [PIO]
The implementation supports the Prioritized Input and Output option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.18
_POSIX_PRIORITY_SCHEDULING [PS]
The implementation supports the Process Scheduling option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.19
_POSIX_RAW_SOCKETS [RS]
The implementation supports the Raw Sockets option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.20
_POSIX_READER_WRITER_LOCKS [THR]
The implementation supports the Read-Write Locks option. This is always set to a value greater than zero if the Threads option is supported. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.21
_POSIX_REALTIME_SIGNALS [RTS]
The implementation supports the Realtime Signals Extension option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.22
_POSIX_REGEXP The implementation supports the Regular Expression Handling option. This symbol shall always be set to a value greater than zero.
- unistd.23
_POSIX_SAVED_IDS Each process has a saved set-user-ID and a saved set-group-ID. This symbol shall always be set to a value greater than zero.
- unistd.24
_POSIX_SEMAPHORES [SEM]
The implementation supports the Semaphores option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.25
_POSIX_SHARED_MEMORY_OBJECTS [SHM]
The implementation supports the Shared Memory Objects option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.26
_POSIX_SHELL The implementation supports the POSIX shell. This symbol shall always be set to a value greater than zero.
- unistd.27
_POSIX_SPAWN [SPN]
The implementation supports the Spawn option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.28
_POSIX_SPIN_LOCKS [SPI]
The implementation supports the Spin Locks option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.29
_POSIX_SPORADIC_SERVER [SS]
The implementation supports the Process Sporadic Server option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.30
_POSIX_SYNCHRONIZED_IO [SIO]
The implementation supports the Synchronized Input and Output option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.31
_POSIX_THREAD_ATTR_STACKADDR [TSA]
The implementation supports the Thread Stack Address Attribute option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.32
_POSIX_THREAD_ATTR_STACKSIZE [TSS]
The implementation supports the Thread Stack Size Attribute option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.33
_POSIX_THREAD_CPUTIME [TCT]
The implementation supports the Thread CPU-Time Clocks option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.34
_POSIX_THREAD_PRIO_INHERIT [TPI]
The implementation supports the Thread Priority Inheritance option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.35
_POSIX_THREAD_PRIO_PROTECT [TPP]
The implementation supports the Thread Priority Protection option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.36
_POSIX_THREAD_PRIORITY_SCHEDULING [TPS]
The implementation supports the Thread Execution Scheduling option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.37
_POSIX_THREAD_PROCESS_SHARED [TSH]
The implementation supports the Thread Process-Shared Synchronization option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.38
_POSIX_THREAD_SAFE_FUNCTIONS [TSF]
The implementation supports the Thread-Safe Functions option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.39
_POSIX_THREAD_SPORADIC_SERVER [TSP]
The implementation supports the Thread Sporadic Server option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.40
_POSIX_THREADS [THR]
The implementation supports the Threads option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.41
_POSIX_TIMEOUTS [TMO]
The implementation supports the Timeouts option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.42
_POSIX_TIMERS [TMR]
The implementation supports the Timers option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.43
_POSIX_TRACE [TRC]
The implementation supports the Trace option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.44
_POSIX_TRACE_EVENT_FILTER [TEF]
The implementation supports the Trace Event Filter option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.45
_POSIX_TRACE_INHERIT [TRI]
The implementation supports the Trace Inherit option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.46
_POSIX_TRACE_LOG [TRL]
The implementation supports the Trace Log option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.47
_POSIX_TYPED_MEMORY_OBJECTS [TYM]
The implementation supports the Typed Memory Objects option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.48
_POSIX_VDISABLE This symbol shall be defined to be the value of a character that shall disable terminal special character handling as described in <termios.h>. This symbol shall always be set to a value other than -1.
- unistd.49
_POSIX2_C_BIND The implementation supports the C-Language Binding option. This symbol shall always have the value 200112L.
- unistd.50
_POSIX2_C_DEV [CD]
The implementation supports the C-Language Development Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.51
_POSIX2_CHAR_TERM The implementation supports at least one terminal type.
- unistd.52
_POSIX2_FORT_DEV [FD]
The implementation supports the FORTRAN Development Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.53
_POSIX2_FORT_RUN [FR]
The implementation supports the FORTRAN Runtime Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.54
_POSIX2_LOCALEDEF The implementation supports the creation of locales by the localedef utility. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.55
_POSIX2_PBS [BE]
The implementation supports the Batch Environment Services and Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.56
_POSIX2_PBS_ACCOUNTING [BE]
The implementation supports the Batch Accounting option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.57
_POSIX2_PBS_CHECKPOINT [BE]
The implementation supports the Batch Checkpoint/Restart option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.58
_POSIX2_PBS_LOCATE [BE]
The implementation supports the Locate Batch Job Request option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.59
_POSIX2_PBS_MESSAGE [BE]
The implementation supports the Batch Job Message Request option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.60
_POSIX2_PBS_TRACK [BE]
The implementation supports the Track Batch Job Request option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.61
_POSIX2_SW_DEV [SD]
The implementation supports the Software Development Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.62
_POSIX2_UPE [UP]
The implementation supports the User Portability Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200112L. The value of this symbol reported by sysconf() shall either be -1 or 200112L.
- unistd.63
_POSIX_V6_ILP32_OFF32 The implementation provides a C-language compilation environment with 32-bit int, long, pointer, and off_t types.
- unistd.64
_POSIX_V6_ILP32_OFFBIG The 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.
- unistd.65
_POSIX_V6_LP64_OFF64 The implementation provides a C-language compilation environment with 32-bit int and 64-bit long, pointer, and off_t types.
- unistd.66
_POSIX_V6_LPBIG_OFFBIG The 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.
- unistd.67
_XBS5_ILP32_OFF32 (LEGACY) [XSI]
The implementation provides a C-language compilation environment with 32-bit int, long, pointer, and off_t types.
- unistd.68
_XBS5_ILP32_OFFBIG (LEGACY) [XSI]
The 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.
- unistd.69
_XBS5_LP64_OFF64 (LEGACY) [XSI]
The implementation provides a C-language compilation environment with 32-bit int and 64-bit long, pointer, and off_t types.
- unistd.70
_XBS5_LPBIG_OFFBIG (LEGACY) [XSI]
The 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.
- unistd.71
_XOPEN_CRYPT [XSI]
The implementation supports the X/Open Encryption Option Group.
- unistd.72
_XOPEN_ENH_I18N The implementation supports the Issue 4, Version 2 Enhanced Internationalization Option Group. This symbol shall always be set to a value other than -1.
- unistd.73
_XOPEN_LEGACY The implementation supports the Legacy Option Group.
- unistd.74
_XOPEN_REALTIME The implementation supports the X/Open Realtime Option Group.
- unistd.75
_XOPEN_REALTIME_THREADS The implementation supports the X/Open Realtime Threads Option Group.
- unistd.76
_XOPEN_SHM The implementation supports the Issue 4, Version 2 Shared Memory Option Group. This symbol shall always be set to a value other than -1.
- unistd.77
_XOPEN_STREAMS The implementation supports the XSI STREAMS Option Group.
- unistd.78
_XOPEN_UNIX [XSI]
The implementation supports the XSI extension.
- unistd.79
_POSIX_ASYNC_IO Asynchronous input or output operations may be performed for the associated file.
- unistd.80
_POSIX_PRIO_IO Prioritized input or output operations may be performed for the associated file.
- unistd.81
_POSIX_SYNC_IO Synchronized input or output operations may be performed for the associated file.
- unistd.82
_XOPEN_VERSION [XSI]
Integer value indicating version of the X/Open Portability Guide to which the implementation conforms. The value shall be 600.
- unistd.83
_POSIX_VERSION Integer value indicating version of IEEE Std 1003.1 (C-language binding) to which the implementation conforms. For implementations conforming to IEEE Std 1003.1-2001, the value shall be 200112L.
- unistd.84
_POSIX2_VERSION Integer value indicating version of the Shell and Utilities volume of IEEE Std 1003.1 to which the implementation conforms. For implementations conforming to IEEE Std 1003.1-2001, the value shall be 200112L.
- unistd.85
The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to have the same value.
- [+]unlocked (3 / 0 / 0)
- unlocked.01
Versions of the functions getc(), getchar(), putc(), and putchar() respectively named getc_unlocked(), getchar_unlocked(), putc_unlocked(), and putchar_unlocked() shall be provided which are functionally equivalent to the original versions, with the exception that they are not required to be implemented in a thread-safe manner.
- unlocked.02
They may only safely be used within a scope protected by flockfile() (or ftrylockfile()) and funlockfile().
- unlocked.03
These functions may safely be used in a multi-threaded program if and only if they are called while the invoking thread owns the ( FILE *) object, as is the case after a successful call to the flockfile() or ftrylockfile() functions.
- [+]usernames (1 / 1 / 0)
- usernames.01
21.2. User & Group NamesTable 21-1 describes required mnemonic user and group names. This specification makes no attempt to numerically assign user or group identity numbers, with the exception that both the User ID and Group ID for the user root shall be equal to 0.Table 21-1. Required User & Group NamesUserGroupCommentsrootrootAdministrative user with all appropriate privilegesbinbinLegacy User ID/Group ID[a]daemondaemonLegacy User ID/Group ID[b]Notes:
a. The bin User ID/Group ID is included for compatibility with legacy applications. New applications should no longer use the bin User ID/Group ID.
b. The daemon User ID/Group ID was used as an unprivileged User ID/Group ID for daemons to execute under in order to limit their access to the system. Generally daemons should now run under individual User ID/Group IDs in order to further partition daemons from one another.
- [+]utmpx (9 / 0 / 0)
- utmpx.01
For all entries that match a request, the ut_type member indicates the type of the entry.
- utmpx.02
Other members of the entry shall contain meaningful data based on the value of the ut_type member as follows:
- utmpx.02.01
No others
- utmpx.02.02
ut_tv
- utmpx.02.03
ut_tv
- utmpx.02.04
ut_tv
- utmpx.02.05
ut_id, ut_user (login name of the user), ut_line, ut_pid, ut_tv
- utmpx.02.06
ut_id, ut_pid, ut_tv
- utmpx.02.07
ut_id, ut_user (implementation-defined name of the login process), ut_pid, ut_tv
- utmpx.02.08
ut_id, ut_pid, ut_tv
- [+]vid_attr (5 / 0 / 0)
- vid_attr.01
These functions output commands to the terminal that change the terminal's attributes.
Generalizes:
- vid_attr.02
- vid_attr.03
- vid_attr.06.01
- vid_attr.06.02
- vid_attr.02
The vid_attr() and vid_puts() functions correspond to vidattr() and vidputs() respectively, but take a set of arguments, one of type attr_t for the attributes, short for the colour pair number and a void *, and thus support the attribute constants with the WA_ prefix.
- vid_attr.03
The opts argument is reserved for definition in a future edition of this document. Currently, the application must provide a null pointer as opts.
- vid_attr.06.01
Upon successful completion, these functions return OK.
- vid_attr.06.02
Otherwise, they return ERR.
- [+]vid_puts (5 / 0 / 0)
- vid_puts.01
These functions output commands to the terminal that change the terminal's attributes.
Generalizes:
- vid_puts.02
- vid_puts.03
- vid_puts.04
- vid_puts.05
- vid_puts.06.01
- vid_puts.06.02
- vid_puts.02
The vid_attr() and vid_puts() functions correspond to vidattr() and vidputs() respectively, but take a set of arguments, one of type attr_t for the attributes, short for the colour pair number and a void *, and thus support the attribute constants with the WA_ prefix.
- vid_puts.03
The opts argument is reserved for definition in a future edition of this document. Currently, the application must provide a null pointer as opts.
- vid_puts.04 (struct)
The user-supplied function putfunc (which can be specified as an argument to either vidputs() or vid_puts()) is either putchar() or some other function with the same prototype.
- vid_puts.05 (struct)
Both the vidputs() and the vid_puts() function ignore the return value of putfunc.
- vid_puts.06.01
Upon successful completion, these functions return OK.
- vid_puts.06.02
Otherwise, they return ERR.
- [+]fs.dir (107 / 40 / 0)
- [+]closedir (6 / 3 / 0)
- closedir.01
The closedir() function shall close the directory stream referred to by the argument dirp. Upon return, the value of dirp may no longer point to an accessible object of the type DIR.
- closedir.03
If a file descriptor is used to implement type DIR, that file descriptor shall be closed.
- closedir.04
Upon successful completion, closedir() shall return 0;
- closedir.05
otherwise, -1 shall be returned and errno set to indicate the error.
- closedir.90
The closedir() function may fail if:
- closedir.90.01
[EBADF] The dirp argument does not refer to an open directory stream.
- closedir.90.02
[EINTR] The closedir() function was interrupted by a signal.
- [+]mkdir (22 / 10 / 0)
- mkdir.01
The mkdir() function shall create a new directory with name path.
- mkdir.02
The file permission bits of the new directory shall be initialized from mode.
- mkdir.03
These file permission bits of the mode argument shall be modified by the process' file creation mask
- mkdir.04
The directory's user ID shall be set to the process' effective user ID
- mkdir.05
The directory's group ID shall be set to the group ID of the parent directory or to the effective group ID of the process. Implementations shall provide a way to initialize the directory's group ID to the group ID of the parent directory. Implementations may, but need not, provide an implementation-defined way to initialize the directory's group ID to the effective group ID of the calling process.
- mkdir.06
The newly created directory shall be an empty directory.
- mkdir.07
If path names a symbolic link, mkdir() shall fail and set errno to [EEXIST].
- mkdir.08
Upon successful completion, mkdir() shall mark for update the st_atime, st_ctime, and st_mtime fields of the directory.
- mkdir.09
Also, the st_ctime and st_mtime fields of the directory that contains the new entry shall be marked for update.
- mkdir.10
Upon successful completion, mkdir() shall return 0.
- mkdir.11
Otherwise, -1 shall be returned, no directory shall be created, and errno shall be set to indicate the error
- mkdir.12
The mkdir() function shall fail if:
- mkdir.12.01
[EACCES] Search permission is denied on a component of the path prefix, or write permission is denied on the parent directory of the directory to be created.
- mkdir.12.02
[EEXIST] The named file exists.
- mkdir.12.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- mkdir.12.04
[EMLINK] The link count of the parent directory would exceed {LINK_MAX}.
- mkdir.12.05
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- mkdir.12.06
[ENOENT] A component of the path prefix specified by path does not name an existing directory or path is an empty string.
- mkdir.12.07
[ENOSPC] The file system does not contain enough space to hold the contents of the new directory or to extend the parent directory of the new directory.
- mkdir.12.08
[ENOTDIR] A component of the path prefix is not a directory.
- mkdir.12.09
[EROFS] The parent directory resides on a read-only file system.
- mkdir.13
The mkdir() function may fail if:
- mkdir.13.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- mkdir.13.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- [+]opendir (13 / 4 / 0)
- app.opendir.01
The opendir() function shall open a directory stream corresponding to the directory named by the dirname argument.
- opendir.02
The directory stream is positioned at the first entry.
- opendir.03
If the type DIR is implemented using a file descriptor, applications shall only be able to open up to a total of {OPEN_MAX} files and directories.
- opendir.04
Upon successful completion, opendir() shall return a pointer to an object of type DIR.
- opendir.05
Otherwise, a null pointer shall be returned and errno set to indicate the error.
- opendir.06
The opendir() function shall fail if:
- opendir.06.01
[EACCES] Search permission is denied for the component of the path prefix of dirname or read permission is denied for dirname.
- opendir.06.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the dirname argument.
- opendir.06.03
[ENAMETOOLONG] The length of the dirname argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- opendir.06.04
[ENOENT] A component of dirname does not name an existing directory or dirname is an empty string.
- opendir.06.05
[ENOTDIR] A component of dirname is not a directory.
- opendir.07
The opendir() function may fail if:
- opendir.07.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the dirname argument.
- opendir.07.02
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- opendir.07.03
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the dirname argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- opendir.07.04
[ENFILE] Too many files are currently open in the system.
- [+]readdir (12 / 6 / 0)
- readdir.01
The readdir() function shall return a pointer to a structure representing the directory entry at the current position in the directory stream specified by the argument dirp, and position the directory stream at the next entry.
- readdir.01.01
Upon successful completion, readdir() shall return a pointer to an object of type struct dirent
- readdir.02
It shall return a null pointer upon reaching the end of the directory stream.
- readdir.02.01
When the end of the directory is encountered, a null pointer shall be returned and errno is not changed
- readdir.03
The readdir() function shall not return directory entries containing empty names
- readdir.04
If entries for dot or dot-dot exist, one entry shall be returned for dot and one entry shall be returned for dot-dot; otherwise, they shall not be returned
- app.readdir.05
The pointer returned by readdir() points to data which may be overwritten by another call to readdir() on the same directory stream.
- app.readdir.06
This data is not overwritten by another call to readdir() on a different directory stream.
- readdir.07
If a file is removed from or added to the directory after the most recent call to opendir() or rewinddir(), whether a subsequent call to readdir() returns an entry for that file is unspecified.
- readdir.08
The readdir() function may buffer several directory entries per actual read operation;
- readdir.09
readdir() shall mark for update the st_atime field of the directory each time the directory is actually read.
- app.readdir.10
After a call to fork(), either the parent or child (but not both) may continue processing the directory stream using readdir(), rewinddir(), [XSI] or seekdir().
- app.readdir.11
If both the parent and child processes use these functions, the result is undefined.
- readdir.12
If the entry names a symbolic link, the value of the d_ino member is unspecified
- app.readdir.13
The readdir() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.
- readdir.16
Applications wishing to check for error situations should set errno to 0 before calling readdir(). If errno is set to non-zero on return, an error occurred.
- readdir.16.01
When an error is encountered, a null pointer shall be returned and errno shall be set to indicate the error.
- readdir.90
The readdir() function shall fail if:
- readdir.90.01
[EOVERFLOW] One of the values in the structure to be returned cannot be represented correctly.
- readdir.91
The readdir() function may fail if:
- readdir.91.01
[EBADF] The dirp argument does not refer to an open directory stream.
- readdir.91.02
[ENOENT] The current position of the directory stream is invalid.
- [+]readdir64 (17 / 5 / 0)
- readdir64.readdir.01
The readdir() function shall return a pointer to a structure representing the directory entry at the current position in the directory stream specified by the argument dirp, and position the directory stream at the next entry.
- readdir64.readdir.01.01
Upon successful completion, readdir() shall return a pointer to an object of type struct dirent
- readdir64.readdir.02
It shall return a null pointer upon reaching the end of the directory stream.
- readdir64.readdir.02.01
When the end of the directory is encountered, a null pointer shall be returned and errno is not changed
- readdir64.readdir.03
The readdir() function shall not return directory entries containing empty names
- readdir64.readdir.04
If entries for dot or dot-dot exist, one entry shall be returned for dot and one entry shall be returned for dot-dot; otherwise, they shall not be returned
- readdir64.readdir.05
The pointer returned by readdir() points to data which may be overwritten by another call to readdir() on the same directory stream.
- readdir64.readdir.06
This data is not overwritten by another call to readdir() on a different directory stream.
- readdir64.readdir.07
If a file is removed from or added to the directory after the most recent call to opendir() or rewinddir(), whether a subsequent call to readdir() returns an entry for that file is unspecified.
- readdir64.readdir.08
The readdir() function may buffer several directory entries per actual read operation;
- readdir64.readdir.09
readdir() shall mark for update the st_atime field of the directory each time the directory is actually read.
- readdir64.readdir.10
After a call to fork(), either the parent or child (but not both) may continue processing the directory stream using readdir(), rewinddir(), [XSI] or seekdir().
- readdir64.readdir.11
If both the parent and child processes use these functions, the result is undefined.
- readdir64.readdir.12
If the entry names a symbolic link, the value of the d_ino member is unspecified
- readdir64.readdir.13
The readdir() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.
- readdir64.readdir.16
Applications wishing to check for error situations should set errno to 0 before calling readdir(). If errno is set to non-zero on return, an error occurred.
- readdir64.readdir.16.01
When an error is encountered, a null pointer shall be returned and errno shall be set to indicate the error.
- readdir64.readdir.90
The readdir() function shall fail if:
- readdir64.readdir.90.01
[EOVERFLOW] One of the values in the structure to be returned cannot be represented correctly.
- readdir64.readdir.91
The readdir() function may fail if:
- readdir64.readdir.91.01
[EBADF] The dirp argument does not refer to an open directory stream.
- readdir64.readdir.91.02
[ENOENT] The current position of the directory stream is invalid.
- [+]readdir_r (9 / 5 / 0)
- readdir_r.01
The readdir_r() function shall initialize the dirent structure referenced by entry to represent the directory entry at the current position in the directory stream referred to by dirp, store a pointer to this structure at the location referenced by result, and position the directory stream at the next entry.
- readdir_r.02
The storage pointed to by entry shall be large enough for a dirent with an array of char d_name members containing at least {NAME_MAX}+1 elements.
- readdir_r.03
Upon successful return, the pointer returned at *result shall have the same value as the argument entry.
- readdir_r.04
Upon reaching the end of the directory stream, this pointer shall have the value NULL.
- readdir_r.05
The readdir_r() function shall not return directory entries containing empty names
- readdir_r.06
If a file is removed from or added to the directory after the most recent call to opendir() or rewinddir(), whether a subsequent call to readdir_r() returns an entry for that file is unspecified.
- readdir_r.07
The readdir_r() function may buffer several directory entries per actual read operation; the readdir_r() function shall mark for update the st_atime field of the directory each time the directory is actually read
- readdir_r.09
If successful, the readdir_r() function shall return zero; otherwise, an error number shall be returned to indicate the error.
- readdir_r.91
The readdir_r() function may fail if:
- readdir_r.91.01
[EBADF] The dirp argument does not refer to an open directory stream.
- [+]rewinddir (2 / 1 / 0)
- rewinddir.01
The rewinddir() function shall reset the position of the directory stream to which dirp refers to the beginning of the directory.
- rewinddir.02
It shall also cause the directory stream to refer to the current state of the corresponding directory, as a call to opendir() would have done.
- app.rewinddir.03
If dirp does not refer to a directory stream, the effect is undefined
- app.rewinddir.04
After a call to the fork() function, either the parent or child (but not both) may continue processing the directory stream using readdir(), rewinddir(), or [XSI] seekdir().
- app.rewinddir.05
If both the parent and child processes use these functions, the result is undefined.
- [+]rmdir (23 / 5 / 0)
- rmdir.01
The rmdir() function shall remove a directory whose name is given by path. The directory shall be removed only if it is an empty directory.
- rmdir.02
If path names a symbolic link, then rmdir() shall fail and set errno to [ENOTDIR].
- rmdir.03
If the path argument refers to a path whose final component is either dot or dot-dot, rmdir() shall fail.
- rmdir.04
If the directory's link count becomes 0 and no process has the directory open, the space occupied by the directory shall be freed and the directory shall no longer be accessible.
- rmdir.05
If one or more processes have the directory open when the last link is removed, the dot and dot-dot entries, if present, shall be removed before rmdir() returns and no new entries may be created in the directory, but the directory shall not be removed until all references to the directory are closed
- rmdir.06
Upon successful completion, the rmdir() function shall mark for update the st_ctime and st_mtime fields of the parent directory.
- rmdir.07
Upon successful completion, the function rmdir() shall return 0.
- rmdir.08
Otherwise, -1 shall be returned, and errno set to indicate the error. If -1 is returned, the named directory shall not be changed.
- rmdir.10
If the directory is the root directory or the current working directory of any process, it is unspecified whether the function succeeds, or whether it shall fail and set errno to [EBUSY].
- rmdir.11
If the directory is not an empty directory, rmdir() shall fail and set errno to [EEXIST] or [ENOTEMPTY].
- rmdir.90
The rmdir() function shall fail if
- rmdir.90.01
[EACCES] Search permission is denied on a component of the path prefix, or write permission is denied on the parent directory of the directory to be removed.
- rmdir.90.02
[EBUSY] The directory to be removed is currently in use by the system or some process and the implementation considers this to be an error.
- rmdir.90.03
[EEXIST] or [ENOTEMPTY] The path argument names a directory that is not an empty directory, or there are hard links to the directory other than dot or a single entry in dot-dot.
- rmdir.90.04
[EINVAL] The path argument contains a last component that is dot.
- rmdir.90.05
[EIO] A physical I/O error has occurred.
- rmdir.90.06
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- rmdir.90.07
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- rmdir.90.08
[ENOENT] A component of path does not name an existing file, or the path argument names a nonexistent directory or points to an empty string.
- rmdir.90.10
[ENOTDIR] A component of path is not a directory.
- rmdir.90.11
[EPERM] or [EACCES] [XSI]
The S_ISVTX flag is set on the parent directory of the directory to be removed and the caller is not the owner of the directory to be removed, nor is the caller the owner of the parent directory, nor does the caller have the appropriate privileges.
- rmdir.90.12
[EROFS] The directory entry to be removed resides on a read-only file system.
- rmdir.91
The rmdir() function may fail if:
- rmdir.91.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- rmdir.91.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- [+]seekdir (2 / 1 / 0)
- seekdir.01
The seekdir() function shall set the position of the next readdir() operation on the directory stream specified by dirp to the position specified by loc
- seekdir.02
The value of loc should have been returned from an earlier call to telldir()
- seekdir.02.01
If the value of loc was not obtained from an earlier call to telldir(), or if a call to rewinddir() occurred between the call to telldir() and the call to seekdir(), the results of subsequent calls to readdir() are unspecified
- [+]telldir (1 / 0 / 0)
- telldir.01
The telldir() function shall obtain the current location associated with the directory stream specified by dirp.
- telldir.01.01
Upon successful completion, telldir() shall return the current location of the specified directory stream.
- app.telldir.02
If the most recent operation on the directory stream was a seekdir(), the directory position returned from the telldir() shall be the same as that supplied as a loc argument for seekdir().
- [+]fs.fifo (20 / 7 / 0)
- [+]mkfifo (20 / 7 / 0)
- mkfifo.01
The mkfifo() function shall create a new FIFO special file named by the pathname pointed to by path.
Generalizes:
- mkfifo.02
- mkfifo.04
- mkfifo.05
- mkfifo.06
- mkfifo.07
- mkfifo.08
- mkfifo.09
- mkfifo.10
- mkfifo.11
- mkfifo.12.01
- mkfifo.12.02
- mkfifo.12.03
- mkfifo.12.04
- mkfifo.12.05
- mkfifo.12.06
- mkfifo.12.07
- mkfifo.12.08
- mkfifo.13.01
- mkfifo.13.02
- mkfifo.02
The file permission bits of the new FIFO shall be initialized from mode. The file permission bits of the mode argument shall be modified by the process' file creation mask.
- app.mkfifo.03 (struct)
When bits in mode other than the file permission bits are set, the effect is implementation-defined.
- mkfifo.04
If path names a symbolic link, mkfifo() shall fail and set errno to [EEXIST].
- mkfifo.05
The FIFO's user ID shall be set to the process' effective user ID.
- mkfifo.06
The FIFO's group ID shall be set to the group ID of the parent directory or to the effective group ID of the process.
- mkfifo.07
Implementations shall provide a way to initialize the FIFO's group ID to the group ID of the parent directory. Implementations may, but need not, provide an implementation-defined way to initialize the FIFO's group ID to the effective group ID of the calling process.
- mkfifo.08
Upon successful completion, mkfifo() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file.
- mkfifo.09
Also, the st_ctime and st_mtime fields of the directory that contains the new entry shall be marked for update.
- mkfifo.10
Upon successful completion, 0 shall be returned.
- mkfifo.11
Otherwise, -1 shall be returned, no FIFO shall be created, and errno shall be set to indicate the error.
- mkfifo.12
The mkfifo() function shall fail if:
- mkfifo.12.01
[EACCES] A component of the path prefix denies search permission, or write permission is denied on the parent directory of the FIFO to be created.
- mkfifo.12.02
[EEXIST] The named file already exists.
- mkfifo.12.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- mkfifo.12.04
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- mkfifo.12.05
[ENOENT] A component of the path prefix specified by path does not name an existing directory or path is an empty string.
- mkfifo.12.06
[ENOSPC] The directory that would contain the new file cannot be extended or the file system is out of file-allocation resources.
- mkfifo.12.07
[ENOTDIR] A component of the path prefix is not a directory.
- mkfifo.12.08
[EROFS] The named file resides on a read-only file system.
- mkfifo.13
The mkfifo() function may fail if:
- mkfifo.13.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- mkfifo.13.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- [+]fs.fs (164 / 40 / 0)
- [+]__xmknod (23 / 7 / 0)
- __xmknod.01
The mknod() function shall create a new file named by the pathname to which the argument path points
The value of ver shall be 1 or the behavior of __xmknod() is undefined
- app.__xmknod.02
The file type for path is OR'ed into the mode argument, and the application shall select one of the following symbolic constants
- app.__xmknod.03
The only portable use of mknod() is to create a FIFO-special file. If mode is not S_IFIFO or dev is not 0, the behavior of mknod() is unspecified
- app.__xmknod.04
The permissions for the new file are OR'ed into the mode argument, and may be selected from any combination of the following symbolic constants
- __xmknod.05
The user ID of the file shall be initialized to the effective user ID of the process
- __xmknod.06
The group ID of the file shall be initialized to either the effective group ID of the process or the group ID of the parent directory. Implementations shall provide a way to initialize the file's group ID to the group ID of the parent directory. Implementations may, but need not, provide an implementation-defined way to initialize the file's group ID to the effective group ID of the calling process.
- __xmknod.07
The owner, group, and other permission bits of mode shall be modified by the file mode creation mask of the process. The mknod() function shall clear each bit whose corresponding bit in the file mode creation mask of the process is set.
- __xmknod.08
If path names a symbolic link, mknod() shall fail and set errno to [EEXIST]
- __xmknod.09
Upon successful completion, mknod() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file
- __xmknod.10
Also, the st_ctime and st_mtime fields of the directory that contains the new entry shall be marked for update
- __xmknod.11
Only a process with appropriate privileges may invoke mknod() for file types other than FIFO-special
- __xmknod.12
Upon successful completion, mknod() shall return 0
- __xmknod.13
Otherwise, it shall return -1, the new file shall not be created, and errno shall be set to indicate the error
- __xmknod.90
The mknod() function shall fail if:
- __xmknod.90.01
[EACCES] A component of the path prefix denies search permission, or write permission is denied on the parent directory.
- __xmknod.90.02
[EEXIST] The named file exists.
- __xmknod.90.03
[EINVAL] An invalid argument exists.
- __xmknod.90.04
[EIO] An I/O error occurred while accessing the file system.
- __xmknod.90.05
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- __xmknod.90.06
[ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- __xmknod.90.07
[ENOENT] A component of the path prefix specified by path does not name an existing directory or path is an empty string.
- __xmknod.90.08
[ENOSPC] The directory that would contain the new file cannot be extended or the file system is out of file allocation resources.
- __xmknod.90.09
[ENOTDIR] A component of the path prefix is not a directory.
- __xmknod.90.10
[EPERM] The invoking process does not have appropriate privileges and the file type is not FIFO-special.
- __xmknod.90.11
[EROFS] The directory in which the file is to be created is located on a read-only file system.
- __xmknod.91
The mknod() function may fail if:
- __xmknod.91.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- __xmknod.91.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- [+]link (24 / 8 / 0)
- link.01
The link() function shall create a new link (directory entry) for the existing file, path1.
- link.02
The link() function shall atomically create a new link for the existing file and the link count of the file shall be incremented by one
- link.03
If path1 names a directory, link() shall fail unless the process has appropriate privileges and the implementation supports using link() on directories
- link.04
Upon successful completion, link() shall mark for update the st_ctime field of the file
- link.05
Also, the st_ctime and st_mtime fields of the directory that contains the new entry shall be marked for update.
- link.06
If link() fails, no link shall be created and the link count of the file shall remain unchanged
- link.07
The implementation may require that the calling process has permission to access the existing file.
- link.08
Upon successful completion, 0 shall be returned.
- link.09
Otherwise, -1 shall be returned and errno set to indicate the error
- link.30
ISO POSIX (2003) specifies that pathname resolution shall follow symbolic links during pathname resolution unless the function is required to act on the symbolic link itself, or certain arguments direct that the function act on the symbolic link itself. The link() function in ISO POSIX (2003) contains no such requirement to operate on a symbolic link. However, a conforming LSB implementation need not follow a symbolic link for the path1 argument.
- link.90
The link() function shall fail if:
- link.90.01
[EACCES] A component of either path prefix denies search permission, or the requested link requires writing in a directory that denies write permission, or the calling process does not have permission to access the existing file and this is required by the implementation.
- link.90.02
[EEXIST] The path2 argument resolves to an existing file or refers to a symbolic link.
- link.90.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path1 or path2 argument.
- link.90.04
[EMLINK] The number of links to the file named by path1 would exceed {LINK_MAX}.
- link.90.05
[ENAMETOOLONG] The length of the path1 or path2 argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- link.90.06
[ENOENT] A component of either path prefix does not exist; the file named by path1 does not exist; or path1 or path2 points to an empty string.
- link.90.07
[ENOSPC] The directory to contain the link cannot be extended.
- link.90.08
[ENOTDIR] A component of either path prefix is not a directory.
- link.90.09
[EPERM] The file named by path1 is a directory and either the calling process does not have appropriate privileges or the implementation prohibits using link() on directories.
- link.90.10
[EROFS] The requested link requires writing in a directory on a read-only file system.
- link.90.11
[EXDEV] The link named by path2 and the file named by path1 are on different file systems and the implementation does not support links between file systems.
- link.90.12
[EXDEV] [XSR] path1 refers to a named STREAM.
- link.92
The link() function may fail if:
- link.92.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path1 or path2 argument.
- link.92.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path1 or path2 argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- [+]remove (49 / 10 / 0)
- remove.01
The remove() function shall cause the file named by the pathname pointed to by path to be no longer accessible by that name
- remove.02
A subsequent attempt to open that file using that name shall fail, unless it is created anew
- remove.05
The unlink() function shall remove a link to a file
- remove.06
If path names a symbolic link, unlink() shall remove the symbolic link named by path and shall not affect any file or directory named by the contents of the symbolic link
- remove.07
Otherwise, unlink() shall remove the link named by the pathname pointed to by path and shall decrement the link count of the file referenced by the link
- remove.08
When the file's link count becomes 0 and no process has the file open, the space occupied by the file shall be freed and the file shall no longer be accessible
- remove.09
If one or more processes have the file open when the last link is removed, the link shall be removed before unlink() returns, but the removal of the file contents shall be postponed until all references to the file are closed.
- remove.10
The path argument shall not name a directory unless the process has appropriate privileges and the implementation supports using unlink() on directories
- remove.11
Upon successful completion, unlink() shall mark for update the st_ctime and st_mtime fields of the parent directory
- remove.12
Also, if the file's link count is not 0, the st_ctime field of the file shall be marked for update
- remove.13
Upon successful completion, 0 shall be returned
- remove.14
Otherwise, -1 shall be returned and errno set to indicate the error
- remove.15
If -1 is returned, the named file shall not be changed
- remove.31
The rmdir() function shall remove a directory whose name is given by path. The directory shall be removed only if it is an empty directory.
- remove.32
If path names a symbolic link, then rmdir() shall fail and set errno to [ENOTDIR].
- remove.33
If the path argument refers to a path whose final component is either dot or dot-dot, rmdir() shall fail.
- remove.34
If the directory's link count becomes 0 and no process has the directory open, the space occupied by the directory shall be freed and the directory shall no longer be accessible.
- remove.35
If one or more processes have the directory open when the last link is removed, the dot and dot-dot entries, if present, shall be removed before rmdir() returns and no new entries may be created in the directory, but the directory shall not be removed until all references to the directory are closed
- remove.36
Upon successful completion, the rmdir() function shall mark for update the st_ctime and st_mtime fields of the parent directory.
- remove.37
Upon successful completion, the function rmdir() shall return 0.
- remove.38
Otherwise, -1 shall be returned, and errno set to indicate the error. If -1 is returned, the named directory shall not be changed.
- remove.40
If the directory is the root directory or the current working directory of any process, it is unspecified whether the function succeeds, or whether it shall fail and set errno to [EBUSY].
- remove.41
If the directory is not an empty directory, rmdir() shall fail and set errno to [EEXIST] or [ENOTEMPTY].
- remove.80
The rmdir() function shall fail if
- remove.80.01
[EACCES] Search permission is denied on a component of the path prefix, or write permission is denied on the parent directory of the directory to be removed.
- remove.80.02
[EBUSY] The directory to be removed is currently in use by the system or some process and the implementation considers this to be an error.
- remove.80.03
[EEXIST] or [ENOTEMPTY] The path argument names a directory that is not an empty directory, or there are hard links to the directory other than dot or a single entry in dot-dot.
- remove.80.04
[EINVAL] The path argument contains a last component that is dot.
- remove.80.05
[EIO] A physical I/O error has occurred.
- remove.80.06
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- remove.80.07
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- remove.80.08
[ENOENT] A component of path does not name an existing file, or the path argument names a nonexistent directory or points to an empty string.
- remove.80.10
[ENOTDIR] A component of path is not a directory.
- remove.80.11
[EPERM] or [EACCES] [XSI]
The S_ISVTX flag is set on the parent directory of the directory to be removed and the caller is not the owner of the directory to be removed, nor is the caller the owner of the parent directory, nor does the caller have the appropriate privileges.
- remove.80.12
[EROFS] The directory entry to be removed resides on a read-only file system.
- remove.81
The rmdir() function may fail if:
- remove.81.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- remove.81.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- remove.90
The unlink() function shall fail and shall not unlink the file if:
- remove.90.01
[EACCES] Search permission is denied for a component of the path prefix, or write permission is denied on the directory containing the directory entry to be removed.
- remove.90.02
[EBUSY] The file named by the path argument cannot be unlinked because it is being used by the system or another process and the implementation considers this an error.
- remove.90.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- remove.90.04
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- remove.90.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- remove.90.06
[ENOTDIR] A component of the path prefix is not a directory.
- remove.90.07
[EPERM] The file named by path is a directory, and either the calling process does not have appropriate privileges, or the implementation prohibits using unlink() on directories.
- remove.90.08
[EPERM] or [EACCES] [XSI]
The S_ISVTX flag is set on the directory containing the file referred to by the path argument and the caller is not the file owner, nor is the caller the directory owner, nor does the caller have appropriate privileges.
- remove.90.09
[EROFS] The directory entry to be unlinked is part of a read-only file system.
- remove.92
The unlink() function may fail and not unlink the file if:
- remove.92.01
[EBUSY] [XSI] The file named by path is a named STREAM.
- remove.92.02
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- remove.92.03
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- remove.92.04
[ETXTBSY] The entry to be unlinked is the last directory entry to a pure procedure (shared text) file that is being executed.
- [+]rename (43 / 6 / 0)
- rename.01
The rename() function shall change the name of a file
- rename.02
If either the old or new argument names a symbolic link, rename() shall operate on the symbolic link itself, and shall not resolve the last component of the argument.
- rename.03
If the old argument and the new argument resolve to the same existing file, rename() shall return successfully and perform no other action
- rename.04
If the old argument points to the pathname of a file that is not a directory, the new argument shall not point to the pathname of a directory
- rename.05
If the link named by the new argument exists, it shall be removed and old renamed to new
- rename.06
In this case, a link named new shall remain visible to other processes throughout the renaming operation and refer either to the file referred to by new or old before the operation began
- rename.07
Write access permission is required for both the directory containing old and the directory containing new
- rename.08
If the old argument points to the pathname of a directory, the new argument shall not point to the pathname of a file that is not a directory
- rename.09
If the directory named by the new argument exists, it shall be removed and old renamed to new.
- rename.10
If new names an existing directory, it shall be required to be an empty directory.
- rename.11
If the old argument points to a pathname of a symbolic link, the symbolic link shall be renamed
- rename.12
If the new argument points to a pathname of a symbolic link, the symbolic link shall be removed
- rename.13
The new pathname shall not contain a path prefix that names old
- rename.14
Write access permission is required for the directory containing old and the directory containing new
- rename.15
If the old argument points to the pathname of a directory, write access permission may be required for the directory named by old
- rename.16
and, if it exists, the directory named by new.
- rename.17
If the link named by the new argument exists and the file's link count becomes 0 when it is removed and no process has the file open, the space occupied by the file shall be freed and the file shall no longer be accessible
- rename.18
If one or more processes have the file open when the last link is removed, the link shall be removed before rename() returns, but the removal of the file contents shall be postponed until all references to the file are closed
- rename.19
Upon successful completion, rename() shall mark for update the st_ctime and st_mtime fields of the parent directory of each file
- rename.20
If the rename() function fails for any reason other than [EIO], any file named by new shall be unaffected
- rename.21
Upon successful completion, rename() shall return 0;
- rename.22
otherwise, -1 shall be returned, [CX] errno shall be set to indicate the error,
- rename.23
In this case, a link named new shall exist throughout the renaming operation and shall refer either to the directory referred to by new or old before the operation began
- rename.24
and neither the file named by old nor the file named by new shall be changed or created
- rename.90
The rename() function shall fail if:
- rename.90.01
[EACCES] [CX] A component of either path prefix denies search permission; or one of the directories containing old or new denies write permissions; or, write permission is required and is denied for a directory pointed to by the old or new arguments.
- rename.90.02
[EBUSY] [CX] The directory named by old or new is currently in use by the system or another process, and the implementation considers this an error.
- rename.90.03
[EEXIST] or [ENOTEMPTY] [CX]
The link named by new is a directory that is not an empty directory.
- rename.90.04
[EINVAL] [CX] The new directory pathname contains a path prefix that names the old directory.
- rename.90.05
[EIO] [CX] A physical I/O error has occurred.
- rename.90.06
[EISDIR] [CX] The new argument points to a directory and the old argument points to a file that is not a directory.
- rename.90.07
[ELOOP] [CX] A loop exists in symbolic links encountered during resolution of the path argument.
- rename.90.08
[EMLINK] [CX] The file named by old is a directory, and the link count of the parent directory of new would exceed {LINK_MAX}.
- rename.90.09
[ENAMETOOLONG] [CX]
The length of the old or new argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- rename.90.10
[ENOENT] [CX] The link named by old does not name an existing file, or either old or new points to an empty string.
- rename.90.11
[ENOSPC] [CX] The directory that would contain new cannot be extended.
- rename.90.12
[ENOTDIR] [CX] A component of either path prefix is not a directory; or the old argument names a directory and new argument names a non-directory file.
- rename.90.13
[EPERM] or [EACCES] [XSI]
The S_ISVTX flag is set on the directory containing the file referred to by old and the caller is not the file owner, nor is the caller the directory owner, nor does the caller have appropriate privileges; or new refers to an existing file, the S_ISVTX flag is set on the directory containing this file, and the caller is not the file owner, nor is the caller the directory owner, nor does the caller have appropriate privileges.
- rename.90.14
[EROFS] [CX] The requested operation requires writing in a directory on a read-only file system.
- rename.90.15
[EXDEV] [CX] The links named by new and old are on different file systems and the implementation does not support links between file systems.
- rename.91
The rename() function may fail if:
- rename.91.01
[EBUSY] [XSI] The file named by the old or new arguments is a named STREAM.
- rename.91.02
[ELOOP] [CX] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- rename.91.03
[ENAMETOOLONG] [CX]
As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- rename.91.04
[ETXTBSY] [CX] The file to be renamed is a pure procedure (shared text) file that is being executed.
- [+]unlink (25 / 9 / 0)
- unlink.05
The unlink() function shall remove a link to a file
- unlink.06
If path names a symbolic link, unlink() shall remove the symbolic link named by path and shall not affect any file or directory named by the contents of the symbolic link
- unlink.07
Otherwise, unlink() shall remove the link named by the pathname pointed to by path and shall decrement the link count of the file referenced by the link
- unlink.08
When the file's link count becomes 0 and no process has the file open, the space occupied by the file shall be freed and the file shall no longer be accessible
- unlink.09
If one or more processes have the file open when the last link is removed, the link shall be removed before unlink() returns, but the removal of the file contents shall be postponed until all references to the file are closed.
- unlink.10
The path argument shall not name a directory unless the process has appropriate privileges and the implementation supports using unlink() on directories
- unlink.11
Upon successful completion, unlink() shall mark for update the st_ctime and st_mtime fields of the parent directory
- unlink.12
Also, if the file's link count is not 0, the st_ctime field of the file shall be marked for update
- unlink.13
Upon successful completion, 0 shall be returned
- unlink.14
Otherwise, -1 shall be returned and errno set to indicate the error
- unlink.15
If -1 is returned, the named file shall not be changed
- unlink.90
The unlink() function shall fail and shall not unlink the file if:
- unlink.90.01
[EACCES] Search permission is denied for a component of the path prefix, or write permission is denied on the directory containing the directory entry to be removed.
- unlink.90.02
[EBUSY] The file named by the path argument cannot be unlinked because it is being used by the system or another process and the implementation considers this an error.
- unlink.90.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- unlink.90.04
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- unlink.90.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- unlink.90.06
[ENOTDIR] A component of the path prefix is not a directory.
- unlink.90.07
[EPERM] The file named by path is a directory, and either the calling process does not have appropriate privileges, or the implementation prohibits using unlink() on directories.
- unlink.90.08
[EPERM] or [EACCES] [XSI]
The S_ISVTX flag is set on the directory containing the file referred to by the path argument and the caller is not the file owner, nor is the caller the directory owner, nor does the caller have appropriate privileges.
- unlink.90.09
[EROFS] The directory entry to be unlinked is part of a read-only file system.
- unlink.90.30
If path specifies a directory, the implementation may return EISDIR instead of EPERM as specified by ISO POSIX (2003).
- unlink.92
The unlink() function may fail and not unlink the file if:
- unlink.92.01
[EBUSY] [XSI] The file named by path is a named STREAM.
- unlink.92.02
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- unlink.92.03
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- unlink.92.04
[ETXTBSY] The entry to be unlinked is the last directory entry to a pure procedure (shared text) file that is being executed.
- [+]fs.ftw (132 / 54 / 0)
- [+]ftw (29 / 8 / 0)
- app.ftw.01
The argument ndirs should be in the range [1, {OPEN_MAX}].
- ftw.01
The ftw() function shall recursively descend the directory hierarchy rooted in path.
- ftw.02
For each object in the hierarchy, ftw() shall call the function pointed to by fn, passing it a pointer to a null-terminated character string containing the name of the object, a pointer to a stat structure containing information about the object, and an integer.
- app.ftw.02
The results are unspecified if the application-supplied fn function does not preserve the current working directory.
- ftw.03
Possible values of the integer, defined in the <ftw.h> header, are:
- ftw.03.01
FTW_D For a directory.
- ftw.03.02
FTW_DNR For a directory that cannot be read.
- ftw.03.03
FTW_F For a file.
- ftw.03.04
FTW_SL For a symbolic link (but see also FTW_NS below).
- ftw.03.05
FTW_NS
- ftw.03.05.01
For an object other than a symbolic link on which stat() could not successfully be executed.
- ftw.03.05.02
If the object is a symbolic link and stat() failed, it is unspecified whether ftw() passes FTW_SL or FTW_NS to the user-supplied function.
- ftw.04
If the integer is FTW_DNR, descendants of that directory shall not be processed.
- ftw.05
If the integer is FTW_NS, the stat structure contains undefined values.
- ftw.06
The ftw() function shall visit a directory before visiting any of its descendants.
- ftw.07
The ftw() function shall use at most one file descriptor for each level in the tree.
- ftw.08
The tree traversal shall continue until either the tree is exhausted, an invocation of fn returns a non-zero value, or some error, other than [EACCES], is detected within ftw().
- ftw.08.01
If the tree is exhausted, ftw() shall return 0.
- ftw.08.02
If the function pointed to by fn returns a non-zero value, ftw() shall stop its tree traversal and return whatever value was returned by the function pointed to by fn.
- ftw.08.03
If ftw() detects an error, it shall return -1 and set errno to indicate the error.
- ftw.08.04
If ftw() encounters an error other than [EACCES] (see FTW_DNR and FTW_NS above), it shall return -1 and set errno to indicate the error.
- ftw.09
The ndirs argument shall specify the maximum number of directory streams or file descriptors or both available for use by ftw() while traversing the tree.
- ftw.10
When ftw() returns it shall close any directory streams and file descriptors it uses not counting any opened by the application-supplied fn function.
- ftw.11
The external variable errno may contain any error value that is possible when a directory is opened or when one of the stat functions is executed on a directory or file.
- ftw.12
The ftw() function shall fail if:
- ftw.12.01
[EACCES] Search permission is denied for any component of path or read permission is denied for path.
- ftw.12.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- ftw.12.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- ftw.12.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- ftw.12.05
[ENOTDIR] A component of path is not a directory.
- ftw.12.06
[EOVERFLOW] A field in the stat structure cannot be represented correctly in the current programming environment for one or more files found in the file hierarchy.
- ftw.13
The ftw() function may fail if:
- ftw.13.01
[EINVAL] The value of the ndirs argument is invalid.
- ftw.13.02
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- ftw.13.03
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- ftw.14
In addition, if the function pointed to by fn encounters system errors, errno may be set accordingly.
- [+]ftw64 (29 / 8 / 0)
- app.ftw64.01
The argument ndirs should be in the range [1, {OPEN_MAX}].
- ftw64.01
The ftw() function shall recursively descend the directory hierarchy rooted in path.
- app.ftw64.02
The results are unspecified if the application-supplied fn function does not preserve the current working directory.
- ftw64.02
For each object in the hierarchy, ftw() shall call the function pointed to by fn, passing it a pointer to a null-terminated character string containing the name of the object, a pointer to a stat structure containing information about the object, and an integer.
- ftw64.03
Possible values of the integer, defined in the <ftw.h> header, are:
- ftw64.03.01
FTW_D For a directory.
- ftw64.03.02
FTW_DNR For a directory that cannot be read.
- ftw64.03.03
FTW_F For a file.
- ftw64.03.04
FTW_SL For a symbolic link (but see also FTW_NS below).
- ftw64.03.05
FTW_NS
- ftw64.03.05.01
For an object other than a symbolic link on which stat() could not successfully be executed.
- ftw64.03.05.02
If the object is a symbolic link and stat() failed, it is unspecified whether ftw() passes FTW_SL or FTW_NS to the user-supplied function.
- ftw64.04
If the integer is FTW_DNR, descendants of that directory shall not be processed.
- ftw64.05
If the integer is FTW_NS, the stat structure contains undefined values.
- ftw64.06
The ftw() function shall visit a directory before visiting any of its descendants.
- ftw64.07
The ftw() function shall use at most one file descriptor for each level in the tree.
- ftw64.08
The tree traversal shall continue until either the tree is exhausted, an invocation of fn returns a non-zero value, or some error, other than [EACCES], is detected within ftw().
- ftw64.08.01
If the tree is exhausted, ftw() shall return 0.
- ftw64.08.02
If the function pointed to by fn returns a non-zero value, ftw() shall stop its tree traversal and return whatever value was returned by the function pointed to by fn.
- ftw64.08.03
If ftw() detects an error, it shall return -1 and set errno to indicate the error.
- ftw64.08.04
If ftw() encounters an error other than [EACCES] (see FTW_DNR and FTW_NS above), it shall return -1 and set errno to indicate the error.
- ftw64.09
The ndirs argument shall specify the maximum number of directory streams or file descriptors or both available for use by ftw() while traversing the tree.
- ftw64.10
When ftw() returns it shall close any directory streams and file descriptors it uses not counting any opened by the application-supplied fn function.
- ftw64.11
The external variable errno may contain any error value that is possible when a directory is opened or when one of the stat functions is executed on a directory or file.
- ftw64.12
The ftw() function shall fail if:
- ftw64.12.01
[EACCES] Search permission is denied for any component of path or read permission is denied for path.
- ftw64.12.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- ftw64.12.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- ftw64.12.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- ftw64.12.05
[ENOTDIR] A component of path is not a directory.
- ftw64.12.06
[EOVERFLOW] A field in the stat structure cannot be represented correctly in the current programming environment for one or more files found in the file hierarchy.
- ftw64.13
The ftw() function may fail if:
- ftw64.13.01
[EINVAL] The value of the ndirs argument is invalid.
- ftw64.13.02
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- ftw64.13.03
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- ftw64.14
In addition, if the function pointed to by fn encounters system errors, errno may be set accordingly.
- [+]nftw (37 / 19 / 0)
- app.nftw.01
The results are unspecified if the application-supplied fn function does not preserve the current working directory.
- nftw.01
The nftw() function shall recursively descend the directory hierarchy rooted in path.
- nftw.02
The nftw() function has a similar effect to ftw() except that it takes an additional argument flags, which is a bitwise-inclusive OR of zero or more of the following flags:
- nftw.02.01
FTW_CHDIR
- nftw.02.01.01
If set, nftw() shall change the current working directory to each directory as it reports files in that directory.
- nftw.02.01.02
If clear, nftw() shall not change the current working directory.
- nftw.02.02
FTW_DEPTH
- nftw.02.02.01
If set, nftw() shall report all files in a directory before reporting the directory itself.
- nftw.02.02.02
If clear, nftw() shall report any directory before reporting the files in that directory.
- nftw.02.03
FTW_MOUNT
- nftw.02.03.01
If set, nftw() shall only report files in the same file system as path.
- nftw.02.03.02
If clear, nftw() shall report all files encountered during the walk.
- nftw.02.04
FTW_PHYS If set, nftw() shall perform a physical walk and shall not follow symbolic links.
- nftw.02.05
If FTW_PHYS is clear and FTW_DEPTH is set, nftw() shall follow links instead of reporting them, but shall not report any directory that would be a descendant of itself.
- nftw.02.06
If FTW_PHYS is clear and FTW_DEPTH is clear, nftw() shall follow links instead of reporting them, but shall not report the contents of any directory that would be a descendant of itself.
- nftw.03
At each file it encounters, nftw() shall call the user-supplied function fn with four arguments:
- nftw.03.01
The first argument is the pathname of the object.
- nftw.03.02
The second argument is a pointer to the stat buffer containing information on the object.
- nftw.03.03
The third argument is an integer giving additional information. Its value is one of the following:
- nftw.03.03.01
FTW_F The object is a file.
- nftw.03.03.02
FTW_D The object is a directory.
- nftw.03.03.03
FTW_DP The object is a directory and subdirectories have been visited. (This condition shall only occur if the FTW_DEPTH flag is included in flags.)
- nftw.03.03.04
FTW_SL The object is a symbolic link. (This condition shall only occur if the FTW_PHYS flag is included in flags.)
- nftw.03.03.05
FTW_SLN The object is a symbolic link that does not name an existing file. (This condition shall only occur if the FTW_PHYS flag is not included in flags.)
- nftw.03.03.06
FTW_DNR
- nftw.03.03.06.01
The object is a directory that cannot be read.
- nftw.03.03.06.02
The fn function shall not be called for any of its descendants.
- nftw.03.03.07
FTW_NS The stat() function failed on the object because of lack of appropriate permission. The stat buffer passed to fn is undefined. Failure of stat() for any other reason is considered an error and nftw() shall return -1.
- nftw.03.04
The fourth argument is a pointer to an FTW structure. The value of base is the offset of the object's filename in the pathname passed as the first argument to fn. The value of level indicates depth relative to the root of the walk, where the root level is 0.
- nftw.04
The argument fd_limit sets the maximum number of file descriptors that shall be used by nftw() while traversing the file tree.
- nftw.05
At most one file descriptor shall be used for each directory level.
- nftw.06
The nftw() function shall continue until the first of the following conditions occurs:
- nftw.06.01
An invocation of fn shall return a non-zero value, in which case nftw() shall return that value.
- nftw.06.02
The nftw() function detects an error other than [EACCES] (see FTW_DNR and FTW_NS above), in which case nftw() shall return -1 and set errno to indicate the error.
- nftw.06.03
The tree is exhausted, in which case nftw() shall return 0.
- nftw.07
The nftw() function shall fail if:
- nftw.07.01
[EACCES] Search permission is denied for any component of path or read permission is denied for path, or fn returns -1 and does not reset errno.
- nftw.07.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- nftw.07.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- nftw.07.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- nftw.07.05
[ENOTDIR] A component of path is not a directory.
- nftw.07.06
[EOVERFLOW] A field in the stat structure cannot be represented correctly in the current programming environment for one or more files found in the file hierarchy.
- nftw.08
The nftw() function may fail if:
- nftw.08.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- nftw.08.02
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- nftw.08.03
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- nftw.08.04
[ENFILE] Too many files are currently open in the system.
- nftw.09
In addition, errno may be set if the function pointed to by fn causes errno to be set.
- [+]nftw64 (37 / 19 / 0)
- nftw64.01
The nftw() function shall recursively descend the directory hierarchy rooted in path.
- app.nftw64.01
The results are unspecified if the application-supplied fn function does not preserve the current working directory.
- nftw64.02
The nftw() function has a similar effect to ftw() except that it takes an additional argument flags, which is a bitwise-inclusive OR of zero or more of the following flags:
- nftw64.02.01
FTW_CHDIR
- nftw64.02.01.01
If set, nftw() shall change the current working directory to each directory as it reports files in that directory.
- nftw64.02.01.02
If clear, nftw() shall not change the current working directory.
- nftw64.02.02
FTW_DEPTH
- nftw64.02.02.01
If set, nftw() shall report all files in a directory before reporting the directory itself.
- nftw64.02.02.02
If clear, nftw() shall report any directory before reporting the files in that directory.
- nftw64.02.03
FTW_MOUNT
- nftw64.02.03.01
If set, nftw() shall only report files in the same file system as path.
- nftw64.02.03.02
If clear, nftw() shall report all files encountered during the walk.
- nftw64.02.04
FTW_PHYS If set, nftw() shall perform a physical walk and shall not follow symbolic links.
- nftw64.02.05
If FTW_PHYS is clear and FTW_DEPTH is set, nftw() shall follow links instead of reporting them, but shall not report any directory that would be a descendant of itself.
- nftw64.02.06
If FTW_PHYS is clear and FTW_DEPTH is clear, nftw() shall follow links instead of reporting them, but shall not report the contents of any directory that would be a descendant of itself.
- nftw64.03
At each file it encounters, nftw() shall call the user-supplied function fn with four arguments:
- nftw64.03.01
The first argument is the pathname of the object.
- nftw64.03.02
The second argument is a pointer to the stat buffer containing information on the object.
- nftw64.03.03
The third argument is an integer giving additional information. Its value is one of the following:
- nftw64.03.03.01
FTW_F The object is a file.
- nftw64.03.03.02
FTW_D The object is a directory.
- nftw64.03.03.03
FTW_DP The object is a directory and subdirectories have been visited. (This condition shall only occur if the FTW_DEPTH flag is included in flags.)
- nftw64.03.03.04
FTW_SL The object is a symbolic link. (This condition shall only occur if the FTW_PHYS flag is included in flags.)
- nftw64.03.03.05
FTW_SLN The object is a symbolic link that does not name an existing file. (This condition shall only occur if the FTW_PHYS flag is not included in flags.)
- nftw64.03.03.06
FTW_DNR
- nftw64.03.03.06.01
The object is a directory that cannot be read.
- nftw64.03.03.06.02
The fn function shall not be called for any of its descendants.
- nftw64.03.03.07
FTW_NS The stat() function failed on the object because of lack of appropriate permission. The stat buffer passed to fn is undefined. Failure of stat() for any other reason is considered an error and nftw() shall return -1.
- nftw64.03.04
The fourth argument is a pointer to an FTW structure. The value of base is the offset of the object's filename in the pathname passed as the first argument to fn. The value of level indicates depth relative to the root of the walk, where the root level is 0.
- nftw64.04
The argument fd_limit sets the maximum number of file descriptors that shall be used by nftw() while traversing the file tree.
- nftw64.05
At most one file descriptor shall be used for each directory level.
- nftw64.06
The nftw() function shall continue until the first of the following conditions occurs:
- nftw64.06.01
An invocation of fn shall return a non-zero value, in which case nftw() shall return that value.
- nftw64.06.02
The nftw() function detects an error other than [EACCES] (see FTW_DNR and FTW_NS above), in which case nftw() shall return -1 and set errno to indicate the error.
- nftw64.06.03
The tree is exhausted, in which case nftw() shall return 0.
- nftw64.07
The nftw() function shall fail if:
- nftw64.07.01
[EACCES] Search permission is denied for any component of path or read permission is denied for path, or fn returns -1 and does not reset errno.
- nftw64.07.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- nftw64.07.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- nftw64.07.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- nftw64.07.05
[ENOTDIR] A component of path is not a directory.
- nftw64.07.06
[EOVERFLOW] A field in the stat structure cannot be represented correctly in the current programming environment for one or more files found in the file hierarchy.
- nftw64.08
The nftw() function may fail if:
- nftw64.08.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- nftw64.08.02
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- nftw64.08.03
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- nftw64.08.04
[ENFILE] Too many files are currently open in the system.
- nftw64.09
In addition, errno may be set if the function pointed to by fn causes errno to be set.
- [+]fs.glob (64 / 35 / 0)
- [+]glob (31 / 18 / 0)
- app.glob.00
It is the caller's responsibility to create the structure pointed to by pglob.
- glob.01
The argument pattern is a pointer to a pathname pattern to be expanded. The glob() function shall match all accessible pathnames against this pattern and develop a list of all pathnames that match.
- glob.02
The glob() function shall store the number of matched pathnames into pglob->gl_pathc and a pointer to a list of pointers to pathnames into pglob->gl_pathv.
- glob.03
The pathnames shall be in sort order as defined by the current setting of the LC_COLLATE category;
- glob.04
The first pointer after the last pathname shall be a null pointer.
- glob.05
If the pattern does not match any pathnames, the returned number of matched paths is set to 0, and the contents of pglob->gl_pathv are implementation-defined.
- glob.06
The glob() function shall allocate other space as needed, including the memory pointed to by gl_pathv.
- glob.07
The flags argument is used to control the behavior of glob(). The value of flags is a bitwise-inclusive OR of zero or more of the following constants, which are defined in <glob.h>:
- glob.07.01
GLOB_APPEND Append pathnames generated to the ones from a previous call to glob().
- glob.07.02
GLOB_DOOFFS Make use of pglob->gl_offs. If this flag is set, pglob->gl_offs is used to specify how many null pointers to add to the beginning of pglob->gl_pathv. In other words, pglob->gl_pathv shall point to pglob->gl_offs null pointers, followed by pglob->gl_pathc pathname pointers, followed by a null pointer.
- glob.07.03
GLOB_ERR Cause glob() to return when it encounters a directory that it cannot open or read. Ordinarily, glob() continues to find matches.
- glob.07.03.01
If (*errfunc()) is called and returns non-zero, or if the GLOB_ERR flag is set in flags, glob() shall stop the scan and return GLOB_ABORTED after setting gl_pathc and gl_pathv in pglob to reflect the paths already scanned.
- glob.07.03.02
If GLOB_ERR is not set and either errfunc is a null pointer or (*errfunc()) returns 0, the error shall be ignored.
- glob.07.04
GLOB_MARK Each pathname that is a directory that matches pattern shall have a slash appended.
- glob.07.05
GLOB_NOCHECK Supports rule 3 in the Shell and Utilities volume of IEEE Std 1003.1-2001, Section 2.13.3, Patterns Used for Filename Expansion. If pattern does not match any pathname, then glob() shall return a list consisting of only pattern, and the number of matched pathnames is 1.
- glob.07.06
GLOB_NOESCAPE Disable backslash escaping.
- glob.07.07
GLOB_NOSORT Ordinarily, glob() sorts the matching pathnames according to the current setting of the LC_COLLATE category; see the Base Definitions volume of IEEE Std 1003.1-2001, Section 7.3.2, LC_COLLATE. When this flag is used, the order of pathnames returned is unspecified.
- glob.07.08
The GLOB_APPEND flag can be used to append a new set of pathnames to those found in a previous call to glob().
- app.glob.08.01
The first such call shall not set GLOB_APPEND. All subsequent calls shall set it.
- app.glob.08.02
All the calls shall set GLOB_DOOFFS, or all shall not set it.
- glob.08
The following rules apply to applications when two or more calls to glob() are made with the same value of pglob and without intervening calls to globfree():
- glob.08.03
After the second call, pglob->gl_pathv points to a list containing the following:
- glob.08.03.01
Zero or more null pointers, as specified by GLOB_DOOFFS and pglob->gl_offs.
- glob.08.03.02
Pointers to the pathnames that were in the pglob->gl_pathv list before the call, in the same order as before.
- glob.08.03.03
Pointers to the new pathnames generated by the second call, in the specified order.
- glob.08.04
The count returned in pglob->gl_pathc shall be the total number of pathnames from the two calls.
- glob.08.05
The application can change any of the fields after a call to glob(). If it does, the application shall reset them to the original value before a subsequent call, using the same pglob value, to globfree() or glob() with the GLOB_APPEND flag.
- glob.09
If, during the search, a directory is encountered that cannot be opened or read and errfunc is not a null pointer, glob() calls (*errfunc()) with two arguments:The epath argument is a pointer to the path that failed.The eerrno argument is the value of errno from the failure, as set by opendir(), readdir(), or stat(). (Other values may be used to report other errors not explicitly documented for those functions.)
- glob.10
The glob() function shall not fail because of large files.
- glob.11
No tilde expansion or parameter substitution is done; see wordexp().
- glob.20.01
Upon successful completion, glob() shall return 0.
- glob.20.02.01
The glob() function shall fail and return the corresponding value if:
- glob.20.02.01.01
GLOB_ABORTED The scan was stopped because GLOB_ERR was set or (*errfunc()) returned non-zero.
- glob.20.02.01.02
GLOB_NOMATCH The pattern does not match any existing pathname, and GLOB_NOCHECK was not set in flags.
- glob.20.02.01.03
GLOB_NOSPACE An attempt to allocate memory failed.
- glob.22
The argument pglob->gl_pathc shall return the number of matched pathnames and the argument pglob->gl_pathv shall contain a pointer to a null-terminated list of matched and sorted pathnames.
- glob.23
However, if pglob->gl_pathc is 0, the content of pglob->gl_pathv is undefined.
- glob.24.02.01
If glob() terminates due to an error, it shall return one of the non-zero constants defined in <glob.h>.
- glob.24.02.02
The arguments pglob->gl_pathc and pglob->gl_pathv are still set as defined above.
- [+]glob64 (31 / 15 / 0)
- app.glob64.00
It is the caller's responsibility to create the structure pointed to by pglob.
- glob64.01
The argument pattern is a pointer to a pathname pattern to be expanded. The glob() function shall match all accessible pathnames against this pattern and develop a list of all pathnames that match.
It shall search for pathnames matching pattern according to the rules used by the shell, /bin/sh.
- glob64.02
The glob() function shall store the number of matched pathnames into pglob->gl_pathc and a pointer to a list of pointers to pathnames into pglob->gl_pathv.
The results of a glob64() call are stored in the structure pointed to by pglob
- glob64.03
The pathnames shall be in sort order as defined by the current setting of the LC_COLLATE category;
- glob64.04
The first pointer after the last pathname shall be a null pointer.
- glob64.04.02
Other possible returns are:
- glob64.05
If the pattern does not match any pathnames, the returned number of matched paths is set to 0, and the contents of pglob->gl_pathv are implementation-defined.
- glob64.06
The glob() function shall allocate other space as needed, including the memory pointed to by gl_pathv.
- glob64.07
The flags argument is used to control the behavior of glob(). The value of flags is a bitwise-inclusive OR of zero or more of the following constants, which are defined in <glob.h>:
- glob64.07.01
GLOB_APPEND Append pathnames generated to the ones from a previous call to glob().
- glob64.07.02
GLOB_DOOFFS Make use of pglob->gl_offs. If this flag is set, pglob->gl_offs is used to specify how many null pointers to add to the beginning of pglob->gl_pathv. In other words, pglob->gl_pathv shall point to pglob->gl_offs null pointers, followed by pglob->gl_pathc pathname pointers, followed by a null pointer.
- glob64.07.03
GLOB_ERR Cause glob() to return when it encounters a directory that it cannot open or read. Ordinarily, glob() continues to find matches.
- glob64.07.03.01
If (*errfunc()) is called and returns non-zero, or if the GLOB_ERR flag is set in flags, glob() shall stop the scan and return GLOB_ABORTED after setting gl_pathc and gl_pathv in pglob to reflect the paths already scanned.
- glob64.07.03.02
If GLOB_ERR is not set and either errfunc is a null pointer or (*errfunc()) returns 0, the error shall be ignored.
- glob64.07.04
GLOB_MARK Each pathname that is a directory that matches pattern shall have a slash appended.
- glob64.07.05
GLOB_NOCHECK Supports rule 3 in the Shell and Utilities volume of IEEE Std 1003.1-2001, Section 2.13.3, Patterns Used for Filename Expansion. If pattern does not match any pathname, then glob() shall return a list consisting of only pattern, and the number of matched pathnames is 1.
- glob64.07.06
GLOB_NOESCAPE Disable backslash escaping.
- glob64.07.07
GLOB_NOSORT Ordinarily, glob() sorts the matching pathnames according to the current setting of the LC_COLLATE category; see the Base Definitions volume of IEEE Std 1003.1-2001, Section 7.3.2, LC_COLLATE. When this flag is used, the order of pathnames returned is unspecified.
- glob64.07.08
The GLOB_APPEND flag can be used to append a new set of pathnames to those found in a previous call to glob().
- app.glob64.08.01
The first such call shall not set GLOB_APPEND. All subsequent calls shall set it.
- app.glob64.08.02
All the calls shall set GLOB_DOOFFS, or all shall not set it.
- glob64.08
The following rules apply to applications when two or more calls to glob() are made with the same value of pglob and without intervening calls to globfree():
- glob64.08.03
After the second call, pglob->gl_pathv points to a list containing the following:
- glob64.08.03.01
Zero or more null pointers, as specified by GLOB_DOOFFS and pglob->gl_offs.
- glob64.08.03.02
Pointers to the pathnames that were in the pglob->gl_pathv list before the call, in the same order as before.
- glob64.08.03.03
Pointers to the new pathnames generated by the second call, in the specified order.
- glob64.08.04
The count returned in pglob->gl_pathc shall be the total number of pathnames from the two calls.
- glob64.08.05
The application can change any of the fields after a call to glob(). If it does, the application shall reset them to the original value before a subsequent call, using the same pglob value, to globfree() or glob() with the GLOB_APPEND flag.
- glob64.09
If, during the search, a directory is encountered that cannot be opened or read and errfunc is not a null pointer, glob() calls (*errfunc()) with two arguments:The epath argument is a pointer to the path that failed.The eerrno argument is the value of errno from the failure, as set by opendir(), readdir(), or stat(). (Other values may be used to report other errors not explicitly documented for those functions.)
- glob64.10
The glob() function shall not fail because of large files.
- glob64.11
No tilde expansion or parameter substitution is done; see wordexp().
- glob64.20.01
Upon successful completion, glob() shall return 0.
On success, 0 is returned.
- glob64.20.02.01
The glob() function shall fail and return the corresponding value if:
- glob64.20.02.01.01
GLOB_ABORTED The scan was stopped because GLOB_ERR was set or (*errfunc()) returned non-zero.
GLOB_ABORTED read error
- glob64.20.02.01.02
GLOB_NOMATCH The pattern does not match any existing pathname, and GLOB_NOCHECK was not set in flags.
GLOB_NOMATCH no match found
- glob64.20.02.01.03
GLOB_NOSPACE An attempt to allocate memory failed.
GLOB_NOSPACE out of memory
- glob64.22
The argument pglob->gl_pathc shall return the number of matched pathnames and the argument pglob->gl_pathv shall contain a pointer to a null-terminated list of matched and sorted pathnames.
- glob64.23
However, if pglob->gl_pathc is 0, the content of pglob->gl_pathv is undefined.
- glob64.24.02.01
If glob() terminates due to an error, it shall return one of the non-zero constants defined in <glob.h>.
- glob64.24.02.02
The arguments pglob->gl_pathc and pglob->gl_pathv are still set as defined above.
- [+]globfree (1 / 1 / 0)
- globfree.01
The globfree() function shall free any space associated with pglob from a previous call to glob().
- [+]globfree64 (1 / 1 / 0)
- globfree64.01
The globfree() function shall free any space associated with pglob from a previous call to glob().
globfree64() frees the dynamically allocated storage from an earlier call to glob64().
- [+]fs.meta.access (123 / 53 / 0)
- [+]access (15 / 5 / 0)
- access.01
The access() function shall check the file named by the pathname pointed to by the path argument for accessibility according to the bit pattern contained in amode, using the real user ID in place of the effective user ID and the real group ID in place of the effective group ID.
- access.02
If the requested access is permitted, access() succeeds and shall return 0;
- access.03
otherwise, -1 shall be returned and errno shall be set to indicate the error.
- access.04
The access() function shall fail if:
- access.04.01
[EACCES] Permission bits of the file mode do not permit the requested access, or search permission is denied on a component of the path prefix.
- access.04.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- access.04.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- access.04.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- access.04.05
[ENOTDIR] A component of the path prefix is not a directory.
- access.04.06
[EROFS] Write access is requested for a file on a read-only file system.
- access.05
The access() function may fail if:
- access.05.01
[EINVAL] The value of the amode argument is invalid.
- access.05.02
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- access.05.03
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- access.05.04
[ETXTBSY] Write access is requested for a pure procedure (shared text) file that is being executed.
- app.access.06
The value of amode is either the bitwise-inclusive OR of the access permissions to be checked (R_OK, W_OK, X_OK) or the existence test (F_OK).
- access.07
If any access permissions are checked, each shall be checked individually, as described in the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 3, Definitions.
- access.08
If the process has appropriate privileges, an implementation may indicate success for X_OK even if none of the execute file permission bits are set.
- [+]chmod (18 / 7 / 0)
- chmod.01
The chmod() function shall change S_ISUID, S_ISGID, [XSI] S_ISVTX, and the file permission bits of the file named by the pathname pointed to by the path argument to the corresponding bits in the mode argument. The application shall ensure that the effective user ID of the process matches the owner of the file or the process has appropriate privileges in order to do this.
- chmod.02
If the calling process does not have appropriate privileges, and if the group ID of the file does not match the effective group ID or one of the supplementary group IDs and if the file is a regular file, bit S_ISGID (set-group-ID on execution) in the file's mode shall be cleared upon successful return from chmod().
- chmod.03
Upon successful completion, chmod() shall mark for update the st_ctime field of the file.
- chmod.04
Upon successful completion, 0 shall be returned;
- chmod.05
otherwise, -1 shall be returned and errno set to indicate the error. If -1 is returned, no change to the file mode occurs.
- chmod.06
The chmod() function shall fail if:
- chmod.06.01
[EACCES] Search permission is denied on a component of the path prefix.
- chmod.06.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- chmod.06.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- chmod.06.04
[ENOTDIR] A component of the path prefix is not a directory.
- chmod.06.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- chmod.06.06
[EPERM] The effective user ID does not match the owner of the file and the process does not have appropriate privileges.
- chmod.06.07
[EROFS] The named file resides on a read-only file system.
- chmod.07
The chmod() function may fail if:
- chmod.07.01
[EINTR] A signal was caught during execution of the function.
- chmod.07.02
[EINVAL] The value of the mode argument is invalid.
- chmod.07.03
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- chmod.07.04
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname strings exceeded {PATH_MAX}.
- chmod.08
Additional implementation-defined restrictions may cause the S_ISUID and S_ISGID bits in mode to be ignored.
- chmod.09
The effect on file descriptors for files open at the time of a call to chmod() is implementation-defined.
- [+]chown (26 / 11 / 0)
- chown.01
The chown() function shall change the user and group ownership of a file.
- chown.02
Only processes with an effective user ID equal to the user ID of the file or with appropriate privileges may change the ownership of a file.
- chown.03
If _POSIX_CHOWN_RESTRICTED is in effect for path:
- chown.03.01
Changing the user ID is restricted to processes with appropriate privileges.
- chown.03.02
Changing the group ID is permitted to a process with an effective user ID equal to the user ID of the file, but without appropriate privileges, if and only if owner is equal to the file's user ID or ( uid_t)-1 and group is equal either to the calling process' effective group ID or to one of its supplementary group IDs.
- chown.04
If the specified file is a regular file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the process does not have appropriate privileges, the set-user-ID (S_ISUID) and set-group-ID (S_ISGID) bits of the file mode shall be cleared upon successful return from chown().
- chown.05
If the specified file is a regular file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the process has appropriate privileges, it is implementation-defined whether the set-user-ID and set-group-ID bits are altered.
- chown.06
If the chown() function is successfully invoked on a file that is not a regular file and one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, the set-user-ID and set-group-ID bits may be cleared.
- chown.07.01
If owner or group is specified as ( uid_t)-1 or ( gid_t)-1, respectively, the corresponding ID of the file shall not be changed.
- chown.07.02
If both owner and group are -1, the times need not be updated.
- chown.08
Upon successful completion, chown() shall mark for update the st_ctime field of the file.
- chown.09
Upon successful completion, 0 shall be returned;
- chown.10
otherwise, -1 shall be returned and errno set to indicate the error.
- chown.11
If -1 is returned, no changes are made in the user ID and group ID of the file.
- chown.12
The chown() function shall fail if:
- chown.12.01
[EACCES] Search permission is denied on a component of the path prefix.
- chown.12.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- chown.12.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- chown.12.04
[ENOTDIR] A component of the path prefix is not a directory.
- chown.12.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- chown.12.06
[EPERM] The effective user ID does not match the owner of the file, or the calling process does not have appropriate privileges and _POSIX_CHOWN_RESTRICTED indicates that such privilege is required.
- chown.12.07
[EROFS] The named file resides on a read-only file system.
- chown.13
The chown() function may fail if:
- chown.13.01
[EIO] An I/O error occurred while reading or writing to the file system.
- chown.13.02
[EINTR] The chown() function was interrupted by a signal which was caught.
- chown.13.03
[EINVAL] The owner or group ID supplied is not a value supported by the implementation.
- chown.13.04
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- chown.13.05
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- chown.14
The path argument points to a pathname naming a file. The user ID and group ID of the named file shall be set to the numeric values contained in owner and group, respectively.
- [+]fchmod (16 / 8 / 0)
- fchmod.01
The fchmod() function shall be equivalent to chmod() except that the file whose permissions are changed is specified by the file descriptor fildes.
- fchmod.02
[SHM] If fildes references a shared memory object, the fchmod() function need only affect the S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits.
- fchmod.03
[TYM] If fildes references a typed memory object, the behavior of fchmod() is unspecified.
- fchmod.04
If fildes refers to a socket, the behavior of fchmod() is unspecified.
- fchmod.05
[XSR] If fildes refers to a STREAM (which is fattach()-ed into the file system name space) the call returns successfully, doing nothing.
- fchmod.06
Upon successful completion, fchmod() shall return 0.
- fchmod.07
Otherwise, it shall return -1 and set errno to indicate the error.
- fchmod.08
The fchmod() function shall fail if:
- fchmod.08.01
[EBADF] The fildes argument is not an open file descriptor.
- fchmod.08.02
[EPERM] The effective user ID does not match the owner of the file and the process does not have appropriate privilege.
- fchmod.08.03
[EROFS] The file referred to by fildes resides on a read-only file system.
- fchmod.09
The fchmod() function may fail if:
- fchmod.09.01
[EINTR] [XSI] The fchmod() function was interrupted by a signal.
- fchmod.09.02
[EINVAL] [XSI] The value of the mode argument is invalid.
- fchmod.09.03
[EINVAL] The fildes argument refers to a pipe and the implementation disallows execution of fchmod() on a pipe.
- fchmod.chmod.02
If the calling process does not have appropriate privileges, and if the group ID of the file does not match the effective group ID or one of the supplementary group IDs and if the file is a regular file, bit S_ISGID (set-group-ID on execution) in the file's mode shall be cleared upon successful return from chmod().
- fchmod.chmod.03
Upon successful completion, chmod() shall mark for update the st_ctime field of the file.
- fchmod.chmod.08
Additional implementation-defined restrictions may cause the S_ISUID and S_ISGID bits in mode to be ignored.
- [+]fchown (20 / 10 / 0)
- fchown.01
The fchown() function shall be equivalent to chown() except that the file whose owner and group are changed is specified by the file descriptor fildes.
- fchown.02
Upon successful completion, fchown() shall return 0.
- fchown.03
Otherwise, it shall return -1 and set errno to indicate the error.
- fchown.04
The fchown() function shall fail if:
- fchown.04.01
[EBADF] The fildes argument is not an open file descriptor.
- fchown.04.02
[EPERM] The effective user ID does not match the owner of the file or the process does not have appropriate privilege and _POSIX_CHOWN_RESTRICTED indicates that such privilege is required.
- fchown.04.03
[EROFS] The file referred to by fildes resides on a read-only file system.
- fchown.05
The fchown() function may fail if:
- fchown.05.01
[EINVAL] The owner or group ID is not a value supported by the implementation. The fildes argument refers to a pipe or socket [XSR] or an fattach()-ed STREAM and the implementation disallows execution of fchown() on a pipe.
- fchown.05.02
[EIO] A physical I/O error has occurred.
- fchown.05.03
[EINTR] The fchown() function was interrupted by a signal which was caught.
- fchown.chown.02
Only processes with an effective user ID equal to the user ID of the file or with appropriate privileges may change the ownership of a file.
- fchown.chown.03.01
Changing the user ID is restricted to processes with appropriate privileges.
- fchown.chown.03.02
Changing the group ID is permitted to a process with an effective user ID equal to the user ID of the file, but without appropriate privileges, if and only if owner is equal to the file's user ID or ( uid_t)-1 and group is equal either to the calling process' effective group ID or to one of its supplementary group IDs.
- fchown.chown.04
If the specified file is a regular file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the process does not have appropriate privileges, the set-user-ID (S_ISUID) and set-group-ID (S_ISGID) bits of the file mode shall be cleared upon successful return from chown().
- fchown.chown.05
If the specified file is a regular file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the process has appropriate privileges, it is implementation-defined whether the set-user-ID and set-group-ID bits are altered.
- fchown.chown.06
If the chown() function is successfully invoked on a file that is not a regular file and one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, the set-user-ID and set-group-ID bits may be cleared.
- fchown.chown.07.01
If owner or group is specified as ( uid_t)-1 or ( gid_t)-1, respectively, the corresponding ID of the file shall not be changed.
- fchown.chown.07.02
If both owner and group are -1, the times need not be updated.
- fchown.chown.08
Upon successful completion, chown() shall mark for update the st_ctime field of the file.
- fchown.chown.11
If -1 is returned, no changes are made in the user ID and group ID of the file.
- fchown.chown.14
The path argument points to a pathname naming a file. The user ID and group ID of the named file shall be set to the numeric values contained in owner and group, respectively.
- [+]lchown (28 / 12 / 0)
- lchown.01
The lchown() function shall be equivalent to chown(), except in the case where the named file is a symbolic link.
- lchown.02
In this case, lchown() shall change the ownership of the symbolic link file itself, while chown() changes the ownership of the file or directory to which the symbolic link refers.
- lchown.03
Upon successful completion, lchown() shall return 0.
- lchown.04
Otherwise, it shall return -1 and set errno to indicate an error.
- lchown.05
The lchown() function shall fail if:
- lchown.05.01
[EACCES] Search permission is denied on a component of the path prefix of path.
- lchown.05.02
[EINVAL] The owner or group ID is not a value supported by the implementation.
- lchown.05.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- lchown.05.04
[ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- lchown.05.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- lchown.05.06
[ENOTDIR] A component of the path prefix of path is not a directory.
- lchown.05.07
[EOPNOTSUPP] The path argument names a symbolic link and the implementation does not support setting the owner or group of a symbolic link.
- lchown.05.08
[EPERM] The effective user ID does not match the owner of the file and the process does not have appropriate privileges.
- lchown.05.09
[EROFS] The file resides on a read-only file system.
- lchown.06
The lchown() function may fail if:
- lchown.06.01
[EIO] An I/O error occurred while reading or writing to the file system.
- lchown.06.02
[EINTR] A signal was caught during execution of the function.
- lchown.06.03
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- lchown.06.04
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- lchown.chown.02
Only processes with an effective user ID equal to the user ID of the file or with appropriate privileges may change the ownership of a file.
- lchown.chown.03.01
Changing the user ID is restricted to processes with appropriate privileges.
- lchown.chown.03.02
Changing the group ID is permitted to a process with an effective user ID equal to the user ID of the file, but without appropriate privileges, if and only if owner is equal to the file's user ID or ( uid_t)-1 and group is equal either to the calling process' effective group ID or to one of its supplementary group IDs.
- lchown.chown.04
If the specified file is a regular file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the process does not have appropriate privileges, the set-user-ID (S_ISUID) and set-group-ID (S_ISGID) bits of the file mode shall be cleared upon successful return from chown().
- lchown.chown.05
If the specified file is a regular file, one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the process has appropriate privileges, it is implementation-defined whether the set-user-ID and set-group-ID bits are altered.
- lchown.chown.06
If the chown() function is successfully invoked on a file that is not a regular file and one or more of the S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, the set-user-ID and set-group-ID bits may be cleared.
- lchown.chown.07.01
If owner or group is specified as ( uid_t)-1 or ( gid_t)-1, respectively, the corresponding ID of the file shall not be changed.
- lchown.chown.07.02
If both owner and group are -1, the times need not be updated.
- lchown.chown.08
Upon successful completion, chown() shall mark for update the st_ctime field of the file.
- lchown.chown.11
If -1 is returned, no changes are made in the user ID and group ID of the file.
- lchown.chown.14
The path argument points to a pathname naming a file. The user ID and group ID of the named file shall be set to the numeric values contained in owner and group, respectively.
- [+]fs.meta.meta (114 / 38 / 0)
- [+]__fxstat (10 / 5 / 0)
- app.__fxstat.30
The functions __xstat(), __lxstat(), and __fxstat() shall implement the ISO POSIX (2003) functions stat(), lstat(), and fstat() respectively.ver shall be 3 or the behavior of these functions is undefined.
- __fxstat.30
__fxstat(3, fildes, stat_buf) shall implement fstat(fildes, stat_buf) as specified by ISO POSIX (2003).
Generalizes:
- __fxstat.fstat.01
- __fxstat.fstat.02
- __fxstat.fstat.03
- __fxstat.fstat.04
- __fxstat.fstat.05
- __fxstat.fstat.06.01
- __fxstat.fstat.06.02
- __fxstat.fstat.06.03
- __fxstat.fstat.07.01
- __fxstat.fstat.01
The fstat() function shall obtain information about an open file associated with the file descriptor fildes, and shall write it to the area pointed to by buf.
- __fxstat.fstat.02
[SHM] If fildes references a shared memory object, the implementation shall update in the stat structure pointed to by the buf argument only the st_uid, st_gid, st_size, and st_mode fields, and only the S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits need be valid. The implementation may update other fields and flags.
- __fxstat.fstat.03
[TYM] If fildes references a typed memory object, the implementation shall update in the stat structure pointed to by the buf argument only the st_uid, st_gid, st_size, and st_mode fields, and only the S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits need be valid. The implementation may update other fields and flags.
- __fxstat.fstat.04
Upon successful completion, 0 shall be returned.
- __fxstat.fstat.05
Otherwise, -1 shall be returned and errno set to indicate the error.
- __fxstat.fstat.06
The fstat() function shall fail if:
- __fxstat.fstat.06.01
[EBADF] The fildes argument is not a valid file descriptor.
- __fxstat.fstat.06.02
[EIO] An I/O error occurred while reading from the file system.
- __fxstat.fstat.06.03
[EOVERFLOW] The file size in bytes or the number of blocks allocated to the file or the file serial number cannot be represented correctly in the structure pointed to by buf.
- __fxstat.fstat.07
The fstat() function may fail if:
- __fxstat.fstat.07.01
[EOVERFLOW] One of the values is too large to store into the structure pointed to by the buf argument.
- [+]__fxstat64 (11 / 5 / 0)
- __fxstat64.08
The functions __xstat64(), __lxstat64(), and __fxstat64() shall implement the Large File Support functions stat64(), lstat64(), and fstat64() respectively.
Generalizes:
- __fxstat64.fstat.01
- __fxstat64.fstat.02
- __fxstat64.fstat.03
- __fxstat64.fstat.04
- __fxstat64.fstat.05
- __fxstat64.fstat.06.01
- __fxstat64.fstat.06.02
- __fxstat64.fstat.06.03
- __fxstat64.fstat.07.01
- app.__fxstat64.09
ver shall be 3 or the behavior of these functions is undefined.
- __fxstat64.10
__fxstat64(3, fildes, stat_buf) shall behave as fstat(fildes, stat_buf) as specified by Large File Support.
Generalizes:
- __fxstat64.fstat.01
- __fxstat64.fstat.02
- __fxstat64.fstat.03
- __fxstat64.fstat.04
- __fxstat64.fstat.05
- __fxstat64.fstat.06.01
- __fxstat64.fstat.06.02
- __fxstat64.fstat.06.03
- __fxstat64.fstat.07.01
- __fxstat64.fstat.01
The fstat() function shall obtain information about an open file associated with the file descriptor fildes, and shall write it to the area pointed to by buf.
- __fxstat64.fstat.02
[SHM] If fildes references a shared memory object, the implementation shall update in the stat structure pointed to by the buf argument only the st_uid, st_gid, st_size, and st_mode fields, and only the S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits need be valid. The implementation may update other fields and flags.
- __fxstat64.fstat.03
[TYM] If fildes references a typed memory object, the implementation shall update in the stat structure pointed to by the buf argument only the st_uid, st_gid, st_size, and st_mode fields, and only the S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH file permission bits need be valid. The implementation may update other fields and flags.
- __fxstat64.fstat.04
Upon successful completion, 0 shall be returned.
- __fxstat64.fstat.05
Otherwise, -1 shall be returned and errno set to indicate the error.
- __fxstat64.fstat.06
The fstat() function shall fail if:
- __fxstat64.fstat.06.01
[EBADF] The fildes argument is not a valid file descriptor.
- __fxstat64.fstat.06.02
[EIO] An I/O error occurred while reading from the file system.
- __fxstat64.fstat.06.03
[EOVERFLOW] The file size in bytes or the number of blocks allocated to the file or the file serial number cannot be represented correctly in the structure pointed to by buf.
- __fxstat64.fstat.07
The fstat() function may fail if:
- __fxstat64.fstat.07.01
[EOVERFLOW] One of the values is too large to store into the structure pointed to by the buf argument.
- [+]__lxstat (15 / 4 / 0)
- __lxstat.30
__lxstat(3, path, stat_buf) shall implement lstat(path, stat_buf) as specified by ISO POSIX (2003).
Generalizes:
- __lxstat.lstat.01
- __lxstat.lstat.02
- __lxstat.lstat.03.01
- __lxstat.lstat.03.02
- __lxstat.lstat.03.03
- __lxstat.lstat.03.04
- __lxstat.lstat.03.05
- __lxstat.lstat.03.06
- __lxstat.lstat.03.07
- __lxstat.lstat.04.01
- __lxstat.lstat.04.02
- __lxstat.lstat.04.03
- __lxstat.lstat.05
- __lxstat.lstat.06
- app.__lxstat.30
The functions __xstat(), __lxstat(), and __fxstat() shall implement the ISO POSIX (2003) functions stat(), lstat(), and fstat() respectively.ver shall be 3 or the behavior of these functions is undefined.
- __lxstat.lstat.01
The lstat() function shall be equivalent to stat(), except when path refers to a symbolic link. In that case lstat() shall return information about the link, while stat() shall return information about the file the link references.
- __lxstat.lstat.02
For symbolic links, the st_mode member shall contain meaningful information when used with the file type macros, and the st_size member shall contain the length of the pathname contained in the symbolic link.
- __lxstat.lstat.03
The lstat() function shall fail if:
- __lxstat.lstat.03.01
[EACCES] A component of the path prefix denies search permission.
- __lxstat.lstat.03.02
[EIO] An error occurred while reading from the file system.
- __lxstat.lstat.03.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- __lxstat.lstat.03.04
[ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- __lxstat.lstat.03.05
[ENOTDIR] A component of the path prefix is not a directory.
- __lxstat.lstat.03.06
[ENOENT] A component of path does not name an existing file or path is an empty string.
- __lxstat.lstat.03.07
[EOVERFLOW] The file size in bytes or the number of blocks allocated to the file or the file serial number cannot be represented correctly in the structure pointed to by buf.
- __lxstat.lstat.04
The lstat() function may fail if:
- __lxstat.lstat.04.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- __lxstat.lstat.04.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- __lxstat.lstat.04.03
[EOVERFLOW] One of the members is too large to store into the structure pointed to by the buf argument.
- __lxstat.lstat.05
Upon successful completion, lstat() shall return 0.
- __lxstat.lstat.06
Otherwise, it shall return -1 and set errno to indicate the error.
- [+]__lxstat64 (16 / 4 / 0)
- __lxstat64.07
The functions __xstat64(), __lxstat64(), and __fxstat64() shall implement the Large File Support functions stat64(), lstat64(), and fstat64() respectively.
Generalizes:
- __lxstat64.lstat.01
- __lxstat64.lstat.02
- __lxstat64.lstat.03.01
- __lxstat64.lstat.03.02
- __lxstat64.lstat.03.03
- __lxstat64.lstat.03.04
- __lxstat64.lstat.03.05
- __lxstat64.lstat.03.06
- __lxstat64.lstat.03.07
- __lxstat64.lstat.04.01
- __lxstat64.lstat.04.02
- __lxstat64.lstat.04.03
- __lxstat64.lstat.05
- __lxstat64.lstat.06
- app.__lxstat64.08
ver shall be 3 or the behavior of these functions is undefined.
- __lxstat64.09
__lxstat64(3, path, stat_buf) shall behave as lstat(path, stat_buf) as specified by Large File Support.
- __lxstat64.lstat.01
The lstat() function shall be equivalent to stat(), except when path refers to a symbolic link. In that case lstat() shall return information about the link, while stat() shall return information about the file the link references.
- __lxstat64.lstat.02
For symbolic links, the st_mode member shall contain meaningful information when used with the file type macros, and the st_size member shall contain the length of the pathname contained in the symbolic link.
- __lxstat64.lstat.03
The lstat() function shall fail if:
- __lxstat64.lstat.03.01
[EACCES] A component of the path prefix denies search permission.
- __lxstat64.lstat.03.02
[EIO] An error occurred while reading from the file system.
- __lxstat64.lstat.03.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- __lxstat64.lstat.03.04
[ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- __lxstat64.lstat.03.05
[ENOTDIR] A component of the path prefix is not a directory.
- __lxstat64.lstat.03.06
[ENOENT] A component of path does not name an existing file or path is an empty string.
- __lxstat64.lstat.03.07
[EOVERFLOW] The file size in bytes or the number of blocks allocated to the file or the file serial number cannot be represented correctly in the structure pointed to by buf.
- __lxstat64.lstat.04
The lstat() function may fail if:
- __lxstat64.lstat.04.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- __lxstat64.lstat.04.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- __lxstat64.lstat.04.03
[EOVERFLOW] One of the members is too large to store into the structure pointed to by the buf argument.
- __lxstat64.lstat.05
Upon successful completion, lstat() shall return 0.
- __lxstat64.lstat.06
Otherwise, it shall return -1 and set errno to indicate the error.
- [+]__xstat (16 / 5 / 0)
- app.__xstat.30
The functions __xstat(), __lxstat(), and __fxstat() shall implement the ISO POSIX (2003) functions stat(), lstat(), and fstat() respectively.ver shall be 3 or the behavior of these functions is undefined.
- __xstat.30
__xstat(3, path, stat_buf) shall implement stat(path, stat_buf) as specified by ISO POSIX (2003).
Generalizes:
- __xstat.stat.01
- __xstat.stat.02
- __xstat.stat.03
- __xstat.stat.04
- __xstat.stat.05
- __xstat.stat.09.01
- __xstat.stat.09.02
- __xstat.stat.09.03
- __xstat.stat.09.04
- __xstat.stat.09.05
- __xstat.stat.09.06
- __xstat.stat.09.07
- __xstat.stat.10.01
- __xstat.stat.10.02
- __xstat.stat.10.03
- __xstat.stat.01
If the named file is a symbolic link, the stat() function shall continue pathname resolution using the contents of the symbolic link, and shall return information pertaining to the resulting file if the file exists.
- __xstat.stat.02
The stat() function shall update any time-related fields (as described in the Base Definitions volume of IEEE Std 1003.1-2001, Section 4.7, File Times Update), before writing into the stat structure.
- __xstat.stat.03
Upon successful completion, 0 shall be returned.
- __xstat.stat.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- __xstat.stat.05
The stat() function shall obtain information about the named file and write it to the area pointed to by the buf argument.
- __xstat.stat.09
The stat() function shall fail if:
- __xstat.stat.09.01
[EACCES] Search permission is denied for a component of the path prefix.
- __xstat.stat.09.02
[EIO] An error occurred while reading from the file system.
- __xstat.stat.09.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- __xstat.stat.09.04
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- __xstat.stat.09.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- __xstat.stat.09.06
[ENOTDIR] A component of the path prefix is not a directory.
- __xstat.stat.09.07
[EOVERFLOW] The file size in bytes or the number of blocks allocated to the file or the file serial number cannot be represented correctly in the structure pointed to by buf.
- __xstat.stat.10
The stat() function may fail if:
- __xstat.stat.10.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- __xstat.stat.10.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- __xstat.stat.10.03
[EOVERFLOW] A value to be stored would overflow one of the members of the stat structure.
- [+]__xstat64 (17 / 4 / 0)
- __xstat64.11
The functions __xstat64(), __lxstat64(), and __fxstat64() shall implement the Large File Support functions stat64(), lstat64(), and fstat64() respectively.
Generalizes:
- __xstat64.stat.01
- __xstat64.stat.02
- __xstat64.stat.03
- __xstat64.stat.04
- __xstat64.stat.05
- __xstat64.stat.09.01
- __xstat64.stat.09.02
- __xstat64.stat.09.03
- __xstat64.stat.09.04
- __xstat64.stat.09.05
- __xstat64.stat.09.06
- __xstat64.stat.09.07
- __xstat64.stat.10.01
- __xstat64.stat.10.02
- __xstat64.stat.10.03
- app.__xstat64.12
ver shall be 3 or the behavior of these functions is undefined.
- __xstat64.13
__xstat64(3, path, stat_buf) shall behave as stat(path, stat_buf) as specified by Large File Support.
Generalizes:
- __xstat64.stat.01
- __xstat64.stat.02
- __xstat64.stat.03
- __xstat64.stat.04
- __xstat64.stat.05
- __xstat64.stat.09.01
- __xstat64.stat.09.02
- __xstat64.stat.09.03
- __xstat64.stat.09.04
- __xstat64.stat.09.05
- __xstat64.stat.09.06
- __xstat64.stat.09.07
- __xstat64.stat.10.01
- __xstat64.stat.10.02
- __xstat64.stat.10.03
- __xstat64.stat.01
If the named file is a symbolic link, the stat() function shall continue pathname resolution using the contents of the symbolic link, and shall return information pertaining to the resulting file if the file exists.
- __xstat64.stat.02
The stat() function shall update any time-related fields (as described in the Base Definitions volume of IEEE Std 1003.1-2001, Section 4.7, File Times Update), before writing into the stat structure.
- __xstat64.stat.03
Upon successful completion, 0 shall be returned.
- __xstat64.stat.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- __xstat64.stat.05
The stat() function shall obtain information about the named file and write it to the area pointed to by the buf argument.
- __xstat64.stat.09
The stat() function shall fail if:
- __xstat64.stat.09.01
[EACCES] Search permission is denied for a component of the path prefix.
- __xstat64.stat.09.02
[EIO] An error occurred while reading from the file system.
- __xstat64.stat.09.03
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- __xstat64.stat.09.04
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- __xstat64.stat.09.05
[ENOENT] A component of path does not name an existing file or path is an empty string.
- __xstat64.stat.09.06
[ENOTDIR] A component of the path prefix is not a directory.
- __xstat64.stat.09.07
[EOVERFLOW] The file size in bytes or the number of blocks allocated to the file or the file serial number cannot be represented correctly in the structure pointed to by buf.
- __xstat64.stat.10
The stat() function may fail if:
- __xstat64.stat.10.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- __xstat64.stat.10.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- __xstat64.stat.10.03
[EOVERFLOW] A value to be stored would overflow one of the members of the stat structure.
- [+]utime (14 / 5 / 0)
- utime.01
The utime() function shall set the access and modification times of the file named by the path argument.
- utime.02
If times is a null pointer, the access and modification times of the file shall be set to the current time. The effective user ID of the process shall match the owner of the file, or the process has write permission to the file or has appropriate privileges, to use utime() in this manner.
- utime.03
If times is not a null pointer, times shall be interpreted as a pointer to a utimbuf structure and the access and modification times shall be set to the values contained in the designated structure. Only a process with the effective user ID equal to the user ID of the file or a process with appropriate privileges may use utime() this way.
- utime.04
Upon successful completion, 0 shall be returned.
- utime.05
Otherwise, -1 shall be returned and errno shall be set to indicate the error, and the file times shall not be affected.
- utime.06
The utime() function shall fail if:
- utime.06.01
[EACCES] Search permission is denied by a component of the path prefix; or the times argument is a null pointer and the effective user ID of the process does not match the owner of the file, the process does not have write permission for the file, and the process does not have appropriate privileges.
- utime.06.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- utime.06.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- utime.06.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- utime.06.05
[ENOTDIR] A component of the path prefix is not a directory.
- utime.06.06
[EPERM] The times argument is not a null pointer and the calling process' effective user ID does not match the owner of the file and the calling process does not have the appropriate privileges.
- utime.06.07
[EROFS] The file system containing the file is read-only.
- utime.07
The utime() function may fail if:
- utime.07.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- utime.07.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- [+]utimes (15 / 6 / 0)
- utimes.01
The utimes() function shall set the access and modification times of the file pointed to by the path argument to the value of the times argument. The utimes() function allows time specifications accurate to the microsecond.
- utimes.02
The times in the timeval structure are measured in seconds and microseconds since the Epoch, although rounding toward the nearest second may occur.
- utimes.03
If the times argument is a null pointer, the access and modification times of the file shall be set to the current time.The effective user ID of the process shall match the owner of the file, or has write access to the file or appropriate privileges to use this call in this manner.
- utimes.04
Upon completion, utimes() shall mark the time of the last file status change, st_ctime, for update.
- utimes.05
The utimes() function shall fail if:
- utimes.05.01
[EACCES] Search permission is denied by a component of the path prefix; or the times argument is a null pointer and the effective user ID of the process does not match the owner of the file and write access is denied.
- utimes.05.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- utimes.05.03
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- utimes.05.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- utimes.05.05
[ENOTDIR] A component of the path prefix is not a directory.
- utimes.05.06
[EPERM] The times argument is not a null pointer and the calling process' effective user ID has write access to the file but does not match the owner of the file and the calling process does not have the appropriate privileges.
- utimes.05.07
[EROFS] The file system containing the file is read-only.
- utimes.06
The utimes() function may fail if:
- utimes.06.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- utimes.06.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- utimes.07
Upon successful completion, 0 shall be returned.
- utimes.08
Otherwise, -1 shall be returned and errno shall be set to indicate the error, and the file times shall not be affected.
- [+]fs.meta.statvfs (48 / 8 / 0)
- [+]fstatvfs (9 / 2 / 0)
- fstatvfs.01
The fstatvfs() function shall obtain information about the file system containing the file referenced by fildes.
Generalizes:
- fstatvfs.03
- fstatvfs.04
- fstatvfs.05.01
- fstatvfs.05.02
- fstatvfs.05.03
- fstatvfs.06.01
- fstatvfs.09
- fstatvfs.10
- fstatvfs.03
Upon successful completion, statvfs() shall return 0.
- fstatvfs.04
Otherwise, it shall return -1 and set errno to indicate the error.
- fstatvfs.05
The fstatvfs() and statvfs() functions shall fail if:
- fstatvfs.05.01
[EIO] An I/O error occurred while reading the file system.
- fstatvfs.05.02
[EINTR] A signal was caught during execution of the function.
- fstatvfs.05.03
[EOVERFLOW] One of the values to be returned cannot be represented correctly in the structure pointed to by buf.
- fstatvfs.06
The fstatvfs() function shall fail if:
- fstatvfs.06.01
[EBADF] The fildes argument is not an open file descriptor.
- app.fstatvfs.08
For both functions, the buf argument is a pointer to a statvfs structure
- fstatvfs.09
Read, write, or execute permission of the named file is not required.
- fstatvfs.10
that shall be filled.
- [+]fstatvfs64 (9 / 2 / 0)
- fstatvfs64.fstatvfs.01
The fstatvfs() function shall obtain information about the file system containing the file referenced by fildes.
Generalizes:
- fstatvfs64.fstatvfs.03
- fstatvfs64.fstatvfs.04
- fstatvfs64.fstatvfs.05.01
- fstatvfs64.fstatvfs.05.02
- fstatvfs64.fstatvfs.05.03
- fstatvfs64.fstatvfs.06.01
- fstatvfs64.fstatvfs.09
- fstatvfs64.fstatvfs.10
- fstatvfs64.fstatvfs.03
Upon successful completion, statvfs() shall return 0.
- fstatvfs64.fstatvfs.04
Otherwise, it shall return -1 and set errno to indicate the error.
- fstatvfs64.fstatvfs.05
The fstatvfs() and statvfs() functions shall fail if:
- fstatvfs64.fstatvfs.05.01
[EIO] An I/O error occurred while reading the file system.
- fstatvfs64.fstatvfs.05.02
[EINTR] A signal was caught during execution of the function.
- fstatvfs64.fstatvfs.05.03
[EOVERFLOW] One of the values to be returned cannot be represented correctly in the structure pointed to by buf.
- fstatvfs64.fstatvfs.06
The fstatvfs() function shall fail if:
- fstatvfs64.fstatvfs.06.01
[EBADF] The fildes argument is not an open file descriptor.
- fstatvfs64.fstatvfs.09
Read, write, or execute permission of the named file is not required.
- fstatvfs64.fstatvfs.10
that shall be filled.
- app.fstatvfs64.fstatvfs.08
For both functions, the buf argument is a pointer to a statvfs structure
- [+]statvfs (15 / 2 / 0)
- statvfs.01
The statvfs() function shall obtain information about the file system containing the file named by path.
Generalizes:
- statvfs.03
- statvfs.04
- statvfs.05.01
- statvfs.05.02
- statvfs.05.03
- statvfs.06.01
- statvfs.06.02
- statvfs.06.03
- statvfs.06.04
- statvfs.06.05
- statvfs.07.01
- statvfs.07.02
- statvfs.09
- statvfs.10
- statvfs.03
Upon successful completion, statvfs() shall return 0.
- statvfs.04
Otherwise, it shall return -1 and set errno to indicate the error.
- statvfs.05
The fstatvfs() and statvfs() functions shall fail if:
- statvfs.05.01
[EIO] An I/O error occurred while reading the file system.
- statvfs.05.02
[EINTR] A signal was caught during execution of the function.
- statvfs.05.03
[EOVERFLOW] One of the values to be returned cannot be represented correctly in the structure pointed to by buf.
- statvfs.06
The statvfs() function shall fail if:
- statvfs.06.01
[EACCES] Search permission is denied on a component of the path prefix.
- statvfs.06.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- statvfs.06.03
[ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- statvfs.06.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- statvfs.06.05
[ENOTDIR] A component of the path prefix of path is not a directory.
- statvfs.07
The statvfs() function may fail if:
- statvfs.07.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- statvfs.07.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- app.statvfs.08
For both functions, the buf argument is a pointer to a statvfs structure
- statvfs.09
Read, write, or execute permission of the named file is not required.
- statvfs.10
that shall be filled.
- [+]statvfs64 (15 / 2 / 0)
- app.statvfs64.statvfs.08
For both functions, the buf argument is a pointer to a statvfs structure
- statvfs64.statvfs.01
The statvfs() function shall obtain information about the file system containing the file named by path.
Generalizes:
- statvfs64.statvfs.03
- statvfs64.statvfs.04
- statvfs64.statvfs.05.01
- statvfs64.statvfs.05.02
- statvfs64.statvfs.05.03
- statvfs64.statvfs.06.01
- statvfs64.statvfs.06.02
- statvfs64.statvfs.06.03
- statvfs64.statvfs.06.04
- statvfs64.statvfs.06.05
- statvfs64.statvfs.07.01
- statvfs64.statvfs.07.02
- statvfs64.statvfs.09
- statvfs64.statvfs.10
- statvfs64.statvfs.03
Upon successful completion, statvfs() shall return 0.
- statvfs64.statvfs.04
Otherwise, it shall return -1 and set errno to indicate the error.
- statvfs64.statvfs.05
The fstatvfs() and statvfs() functions shall fail if:
- statvfs64.statvfs.05.01
[EIO] An I/O error occurred while reading the file system.
- statvfs64.statvfs.05.02
[EINTR] A signal was caught during execution of the function.
- statvfs64.statvfs.05.03
[EOVERFLOW] One of the values to be returned cannot be represented correctly in the structure pointed to by buf.
- statvfs64.statvfs.06
The statvfs() function shall fail if:
- statvfs64.statvfs.06.01
[EACCES] Search permission is denied on a component of the path prefix.
- statvfs64.statvfs.06.02
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- statvfs64.statvfs.06.03
[ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- statvfs64.statvfs.06.04
[ENOENT] A component of path does not name an existing file or path is an empty string.
- statvfs64.statvfs.06.05
[ENOTDIR] A component of the path prefix of path is not a directory.
- statvfs64.statvfs.07
The statvfs() function may fail if:
- statvfs64.statvfs.07.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- statvfs64.statvfs.07.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- statvfs64.statvfs.09
Read, write, or execute permission of the named file is not required.
- statvfs64.statvfs.10
that shall be filled.
- [+]fs.name (24 / 11 / 0)
- [+]basename (4 / 4 / 0)
- basename.01
The basename() function shall return a pointer to the final component of path.
- basename.01.01
The basename() function shall take the pathname pointed to by path and return a pointer to the final component of the pathname, deleting any trailing '/' characters.
- basename.02
If the string pointed to by path consists entirely of the '/' character, basename() shall return a pointer to the string "/".
- basename.03
If the string pointed to by path is exactly "//", it is implementation-defined whether '/' or "//" is returned
- basename.04
If path is a null pointer or points to an empty string, basename() shall return a pointer to the string ".".
- app.basename.05
The basename() function may modify the string pointed to by path, and may return a pointer to static storage that may then be overwritten by a subsequent call to basename().
- app.basename.06
The basename() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.
- [+]dirname (5 / 2 / 0)
- dirname.01
The dirname() function shall return a pointer to a string that is the parent directory of path.
- dirname.01.01
The dirname() function shall take a pointer to a character string that contains a pathname, and return a pointer to a string that is a pathname of the parent directory of that file.
- dirname.02
Trailing '/' characters in the path are not counted as part of the path.
- dirname.03
If path does not contain a '/', then dirname() shall return a pointer to the string ".".
- dirname.04
If path is a null pointer or points to an empty string, dirname() shall return a pointer to the string "." .
- app.dirname.05
The dirname() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.
- app.dirname.06
The dirname() function may modify the string pointed to by path, and may return a pointer to static storage that may then be overwritten by subsequent calls to dirname().
- dirname.07
If path is a null pointer or points to an empty string, a pointer to a string "." is returned.
- [+]realpath (15 / 5 / 0)
- realpath.01
The realpath() function shall derive, from the pathname pointed to by file_name, an absolute pathname that names the same file, whose resolution does not involve '.', '..', or symbolic links.
- realpath.02
The generated pathname shall be stored as a null-terminated string, up to a maximum of {PATH_MAX} bytes, in the buffer pointed to by resolved_name.
- realpath.03
If resolved_name is a null pointer, the behavior of realpath() is implementation-defined.
- realpath.04
Upon successful completion, realpath() shall return a pointer to the resolved name.
- realpath.05
Otherwise, realpath() shall return a null pointer and set errno to indicate the error, and the contents of the buffer pointed to by resolved_name are undefined.
- realpath.06
The realpath() function shall fail if:
- realpath.06.01
[EACCES] Read or search permission was denied for a component of file_name.
- realpath.06.02
[EINVAL] The file_name argument is a null pointer.
- realpath.06.03
[EIO] An error occurred while reading from the file system.
- realpath.06.04
[ELOOP] A loop exists in symbolic links encountered during resolution of the file_name argument.
- realpath.06.05
[ENAMETOOLONG] The length of the file_name argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- realpath.06.06
[ENOENT] A component of file_name does not name an existing file or file_name points to an empty string.
- realpath.06.07
[ENOTDIR] A component of the path prefix is not a directory.
- realpath.07
The realpath() function may fail if:
- realpath.07.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the file_name argument.
- realpath.07.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- realpath.07.03
[ENOMEM] Insufficient storage space is available.
- [+]fs.symlink (33 / 14 / 0)
- [+]readlink (17 / 8 / 0)
- readlink.01
The readlink() function shall place the contents of the symbolic link referred to by path in the buffer buf which has size bufsize.
- readlink.02
If the number of bytes in the symbolic link is less than bufsize, the contents of the remainder of buf are unspecified.
- readlink.03
If the buf argument is not large enough to contain the link content, the first bufsize bytes shall be placed in buf.
- readlink.04
Upon successful completion, readlink() shall return the count of bytes placed in the buffer.
- readlink.05.01
Otherwise, it shall return a value of -1,
- readlink.05.02
leave the buffer unchanged,
- readlink.05.03
and set errno to indicate the error
- readlink.06
The readlink() function shall fail if:
- readlink.06.01
[EACCES] Search permission is denied for a component of the path prefix of path.
- readlink.06.02
[EINVAL] The path argument names a file that is not a symbolic link.
- readlink.06.03
[EIO] An I/O error occurred while reading from the file system.
- readlink.06.04
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- readlink.06.05
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- readlink.06.06
[ENOENT] A component of path does not name an existing file or path is an empty string.
- readlink.06.07
[ENOTDIR] A component of the path prefix is not a directory.
- readlink.07
The readlink() function may fail if:
- readlink.07.01
[EACCES] Read permission is denied for the directory.
- readlink.07.02
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- readlink.07.03
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- [+]symlink (16 / 6 / 0)
- symlink.01
The symlink() function shall create a symbolic link called path2 that contains the string pointed to by path1
- symlink.02
The string pointed to by path1 shall be treated only as a character string and shall not be validated as a pathname.
- symlink.03
If the symlink() function fails for any reason other than [EIO], any file named by path2 shall be unaffected.
- symlink.04.01
Upon successful completion, symlink() shall return 0;
- symlink.04.02
otherwise, it shall return -1 and set errno to indicate the error.
- symlink.05
The symlink() function shall fail if:
- symlink.05.01
[EACCES] Write permission is denied in the directory where the symbolic link is being created, or search permission is denied for a component of the path prefix of path2.
- symlink.05.02
[EEXIST] The path2 argument names an existing file or symbolic link.
- symlink.05.03
[EIO] An I/O error occurs while reading from or writing to the file system.
- symlink.05.04
[ELOOP] A loop exists in symbolic links encountered during resolution of the path2 argument.
- symlink.05.05
[ENAMETOOLONG] The length of the path2 argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX} or the length of the path1 argument is longer than {SYMLINK_MAX}.
- symlink.05.06
[ENOENT] A component of path2 does not name an existing file or path2 is an empty string.
- symlink.05.07
[ENOSPC] The directory in which the entry for the new symbolic link is being placed cannot be extended because no space is left on the file system containing the directory, or the new symbolic link cannot be created because no space is left on the file system which shall contain the link, or the file system is out of file-allocation resources.
- symlink.05.08
[ENOTDIR] A component of the path prefix of path2 is not a directory.
- symlink.05.09
[EROFS] The new symbolic link would reside on a read-only file system.
- symlink.06
The symlink() function may fail if:
- symlink.06.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path2 argument.
- symlink.06.02
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path2 argument, the length of the substituted pathname string exceeded {PATH_MAX} bytes (including the terminating null byte), or the length of the string pointed to by path1 exceeded {SYMLINK_MAX}.
- [+]fs.tmpfile (69 / 14 / 0)
- [+]mkstemp (7 / 3 / 0)
- mkstemp.01.01
The mkstemp() function shall replace the contents of the string pointed to by template by a unique filename,
Generalizes:
- mkstemp.01.02
- mkstemp.02
- mkstemp.04
- mkstemp.05
- mkstemp.06.01
- mkstemp.06.02
- mkstemp.01.02
and return a file descriptor for the file open for reading and writing.
- mkstemp.02
The function thus prevents any possible race condition between testing whether the file exists and opening it for use.
- app.mkstemp.03
The string in template should look like a filename
- app.mkstemp.03.01
- app.mkstemp.03.02
with six trailing 'X' s;
- mkstemp.04
mkstemp() replaces each 'X' with a character from the portable filename character set.
- mkstemp.05
The characters are chosen such that the resulting name does not duplicate the name of an existing file at the time of a call to mkstemp().
- mkstemp.06.01
Upon successful completion, mkstemp() shall return an open file descriptor.
- mkstemp.06.02
Otherwise, -1 shall be returned if no suitable file could be created.
- [+]mkstemp64 (7 / 0 / 0)
- app.mkstemp64.mkstemp.03
The string in template should look like a filename
- app.mkstemp64.mkstemp.03.01
- app.mkstemp64.mkstemp.03.02
with six trailing 'X' s;
- mkstemp64.mkstemp.01.01
The mkstemp() function shall replace the contents of the string pointed to by template by a unique filename,
Generalizes:
- mkstemp64.mkstemp.01.02
- mkstemp64.mkstemp.02
- mkstemp64.mkstemp.04
- mkstemp64.mkstemp.05
- mkstemp64.mkstemp.06.01
- mkstemp64.mkstemp.06.02
- mkstemp64.mkstemp.01.02
and return a file descriptor for the file open for reading and writing.
- mkstemp64.mkstemp.02
The function thus prevents any possible race condition between testing whether the file exists and opening it for use.
- mkstemp64.mkstemp.04
mkstemp() replaces each 'X' with a character from the portable filename character set.
- mkstemp64.mkstemp.05
The characters are chosen such that the resulting name does not duplicate the name of an existing file at the time of a call to mkstemp().
- mkstemp64.mkstemp.06.01
Upon successful completion, mkstemp() shall return an open file descriptor.
- mkstemp64.mkstemp.06.02
Otherwise, -1 shall be returned if no suitable file could be created.
- [+]mktemp (5 / 3 / 0)
- mktemp.01.01
The mktemp() function shall replace the contents of the string pointed to by template by a unique filename
- mktemp.01.02
and return template.
- app.mktemp.02
The application shall initialize template to be a filename
- app.mktemp.02.01
- app.mktemp.02.02
with six trailing 'X' s;
- mktemp.03
mktemp() shall replace each 'X' with a single byte character from the portable filename character set.
- mktemp.04.01
The mktemp() function shall return the pointer template.
- mktemp.04.02
If a unique name cannot be created, template shall point to a null string.
- [+]tempnam (12 / 3 / 0)
- tempnam.01
The tempnam() function shall generate a pathname that may be used for a temporary file.
Generalizes:
- tempnam.02
- tempnam.03
- tempnam.04
- tempnam.05
- tempnam.06.01
- tempnam.06.02
- tempnam.07.01.01
- tempnam.07.01.02
- tempnam.07.02
- tempnam.08.01
- tempnam.09
- tempnam.02
The tempnam() function allows the user to control the choice of a directory.
- tempnam.03
The dir argument points to the name of the directory in which the file is to be created.
- tempnam.04
If dir is a null pointer or points to a string which is not a name for an appropriate directory, the path prefix defined as P_tmpdir in the <stdio.h> header shall be used.
- tempnam.05
If that directory is not accessible, an implementation-defined directory may be used.
- tempnam.06
The pfx argument should be used for this.
- tempnam.06.01
This argument may be a null pointer
- tempnam.06.02
a string of up to five bytes to be used as the beginning of the filename
- tempnam.07.01.01
Upon successful completion, tempnam() shall allocate space for a string, put the generated pathname in that space, and return a pointer to it.
- tempnam.07.01.02
The pointer shall be suitable for use in a subsequent call to free().
- tempnam.07.02
Otherwise, it shall return a null pointer and set errno to indicate the error.
- tempnam.08
The tempnam() function shall fail if:
- tempnam.08.01
[ENOMEM] Insufficient storage space is available.
- tempnam.09
Some implementations of tempnam() may use tmpnam() internally. On such implementations, if called more than {TMP_MAX} times in a single process, the behavior is implementation-defined.
- [+]tmpfile (14 / 3 / 0)
- tmpfile.01
The tmpfile() function shall create a temporary file and open a corresponding stream.
Generalizes:
- tmpfile.02
- tmpfile.03
- tmpfile.04
- tmpfile.05
- tmpfile.06.01
- tmpfile.06.02
- tmpfile.07.01
- tmpfile.07.02
- tmpfile.07.03
- tmpfile.07.04
- tmpfile.07.05
- tmpfile.08.01
- tmpfile.08.02
- tmpfile.02
The file shall be automatically deleted when all references to the file are closed.
- tmpfile.03
The file is opened as in fopen() for update (w+).
- tmpfile.04
In some implementations, a permanent file may be left behind if the process calling tmpfile() is killed while it is processing a call to tmpfile().
- tmpfile.05
An error message may be written to standard error if the stream cannot be opened.
- tmpfile.06.01
Upon successful completion, tmpfile() shall return a pointer to the stream of the file that is created.
- tmpfile.06.02
Otherwise, it shall return a null pointer [CX] and set errno to indicate the error.
- tmpfile.07
The tmpfile() function shall fail if:
- tmpfile.07.01
[EINTR] [CX] A signal was caught during tmpfile().
- tmpfile.07.02
[EMFILE] [CX] {OPEN_MAX} file descriptors are currently open in the calling process.
- tmpfile.07.03
[ENFILE] [CX] The maximum allowable number of files is currently open in the system.
- tmpfile.07.04
[ENOSPC] [CX] The directory or file system which would contain the new file cannot be expanded.
- tmpfile.07.05
[EOVERFLOW] [CX] The file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- tmpfile.08
The tmpfile() function may fail if:
- tmpfile.08.01
[EMFILE] [CX] {FOPEN_MAX} streams are currently open in the calling process.
- tmpfile.08.02
[ENOMEM] [CX] Insufficient storage space is available.
- [+]tmpfile64 (14 / 0 / 0)
- tmpfile64.tmpfile.01
The tmpfile() function shall create a temporary file and open a corresponding stream.
Generalizes:
- tmpfile64.tmpfile.02
- tmpfile64.tmpfile.03
- tmpfile64.tmpfile.04
- tmpfile64.tmpfile.05
- tmpfile64.tmpfile.06.01
- tmpfile64.tmpfile.06.02
- tmpfile64.tmpfile.07.01
- tmpfile64.tmpfile.07.02
- tmpfile64.tmpfile.07.03
- tmpfile64.tmpfile.07.04
- tmpfile64.tmpfile.07.05
- tmpfile64.tmpfile.08.01
- tmpfile64.tmpfile.08.02
- tmpfile64.tmpfile.02
The file shall be automatically deleted when all references to the file are closed.
- tmpfile64.tmpfile.03
The file is opened as in fopen() for update (w+).
- tmpfile64.tmpfile.04
In some implementations, a permanent file may be left behind if the process calling tmpfile() is killed while it is processing a call to tmpfile().
- tmpfile64.tmpfile.05
An error message may be written to standard error if the stream cannot be opened.
- tmpfile64.tmpfile.06.01
Upon successful completion, tmpfile() shall return a pointer to the stream of the file that is created.
- tmpfile64.tmpfile.06.02
Otherwise, it shall return a null pointer [CX] and set errno to indicate the error.
- tmpfile64.tmpfile.07
The tmpfile() function shall fail if:
- tmpfile64.tmpfile.07.01
[EINTR] [CX] A signal was caught during tmpfile().
- tmpfile64.tmpfile.07.02
[EMFILE] [CX] {OPEN_MAX} file descriptors are currently open in the calling process.
- tmpfile64.tmpfile.07.03
[ENFILE] [CX] The maximum allowable number of files is currently open in the system.
- tmpfile64.tmpfile.07.04
[ENOSPC] [CX] The directory or file system which would contain the new file cannot be expanded.
- tmpfile64.tmpfile.07.05
[EOVERFLOW] [CX] The file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- tmpfile64.tmpfile.08
The tmpfile() function may fail if:
- tmpfile64.tmpfile.08.01
[EMFILE] [CX] {FOPEN_MAX} streams are currently open in the calling process.
- tmpfile64.tmpfile.08.02
[ENOMEM] [CX] Insufficient storage space is available.
- [+]tmpnam (10 / 2 / 0)
- tmpnam.01
The tmpnam() function shall generate a string that is a valid filename and that is not the same as the name of an existing file.
Generalizes:
- tmpnam.02
- tmpnam.03.01
- tmpnam.03.02
- tmpnam.04
- tmpnam.06
- tmpnam.07
- tmpnam.08
- tmpnam.09
- tmpnam.10.02
- tmpnam.02
The function is potentially capable of generating {TMP_MAX} different strings, but any or all of them may already be in use by existing files and thus not be suitable return values.
- tmpnam.03.01
The tmpnam() function generates a different string each time it is called from the same process, up to {TMP_MAX} times.
- tmpnam.03.02
If it is called more than {TMP_MAX} times, the behavior is implementation-defined.
- tmpnam.04
The implementation shall behave as if no function defined in this volume of IEEE Std 1003.1-2001, except tempnam(), calls tmpnam().
- app.tmpnam.05
If the application uses any of the functions guaranteed to be available if either _POSIX_THREAD_SAFE_FUNCTIONS or _POSIX_THREADS is defined, the application shall ensure that the tmpnam() function is called with a non-NULL parameter.
- tmpnam.06
Upon successful completion, tmpnam() shall return a pointer to a string
- tmpnam.07
If no suitable string can be generated, the tmpnam() function shall return a null pointer.
- tmpnam.08
If the argument s is a null pointer, tmpnam() shall leave its result in an internal static object and return a pointer to that object.
- tmpnam.09
Subsequent calls to tmpnam() may modify the same object.
- tmpnam.10.02
tmpnam() shall write its result in that array and shall return the argument as its value.
- app.tmpnam.10.01
If the argument s is not a null pointer, it is presumed to point to an array of at least L_tmpnam chars;
- [+]io.file (1144 / 309 / 0)
- [+]close (31 / 10 / 0)
- close.01
The close() function shall deallocate the file descriptor indicated by fildes. To deallocate means to make the file descriptor available for return by subsequent calls to open() or other functions that allocate file descriptors.
- close.02
All outstanding record locks owned by the process on the file associated with the file descriptor shall be removed (that is, unlocked).
- close.03
When all file descriptors associated with a pipe or FIFO special file are closed, any data remaining in the pipe or FIFO shall be discarded.
- close.04
When all file descriptors associated with an open file description have been closed, the open file description shall be freed.
- close.05
If the link count of the file is 0, when all file descriptors associated with the file are closed, the space occupied by the file shall be freed and the file shall no longer be accessible.
- close.06.01
If a STREAMS-based fildes is closed and the calling process was previously registered to receive a SIGPOLL signal for events associated with that STREAM, the calling process shall be unregistered for events associated with the STREAM.
- close.06.02
The last close() for a STREAM shall cause the STREAM associated with fildes to be dismantled.
- close.06.03
If O_NONBLOCK is not set and there have been no signals posted for the STREAM, and if there is data on the module's write queue, close() shall wait for an unspecified time (for each module and driver) for any output to drain before dismantling the STREAM.
- close.06.04
If the O_NONBLOCK flag is set, or if there are any pending signals, close() shall not wait for output to drain, and shall dismantle the STREAM immediately.
- close.07.01
If the implementation supports STREAMS-based pipes, and fildes is associated with one end of a pipe, the last close() shall cause a hangup to occur on the other end of the pipe.
- close.07.02
In addition, if the other end of the pipe has been named by fattach(), then the last close() shall force the named end to be detached by fdetach().
- close.07.03
If the named end has no open file descriptors associated with it and gets detached, the STREAM associated with that end shall also be dismantled.
- close.08
If fildes refers to the master side of a pseudo-terminal, and this is the last close, a SIGHUP signal shall be sent to the controlling process, if any, for which the slave side of the pseudo-terminal is the controlling terminal.
- close.09
If fildes refers to the slave side of a STREAMS-based pseudo-terminal, a zero-length message may be sent to the master.
- close.10.01
When there is an outstanding cancelable asynchronous I/O operation against fildes when close() is called, that I/O operation may be canceled.
- close.10.02
An I/O operation that is not canceled completes as if the close() operation had not yet occurred.
- close.10.03
All operations that are not canceled shall complete as if the close() blocked until the operations completed.
- close.10.04
The close() operation itself need not block awaiting such I/O completion.
- close.11.01
If a shared memory object or a memory mapped file remains referenced at the last close (that is, a process has it mapped), then the entire contents of the memory object shall persist until the memory object becomes unreferenced.
- close.11.02
If this is the last close of a shared memory object or a memory mapped file and the close results in the memory object becoming unreferenced, and the memory object has been unlinked, then the memory object shall be removed.
- close.12.01
If fildes refers to a socket, close() shall cause the socket to be destroyed.
- close.12.02
If the socket is in connection-mode, and the SO_LINGER option is set for the socket with non-zero linger time, and the socket has untransmitted data, then close() shall block for up to the current linger interval until all data is transmitted.
- close.13.01
Upon successful completion, 0 shall be returned;
- close.13.02
otherwise, -1 shall be returned and errno set to indicate the error.
- close.14
The close() function shall fail if:
- close.14.01
[EBADF] The fildes argument is not a valid file descriptor.
- close.14.02
[EINTR] The close() function was interrupted by a signal.
- close.15
The close() function may fail if:
- close.15.01
[EIO] An I/O error occurred while reading from or writing to the file system.
- close.16.01
If close() is interrupted by a signal that is to be caught, it shall return -1 with errno set to [EINTR] and the state of fildes is unspecified.
- close.16.02
If an I/O error occurred while reading from or writing to the file system during close(), it may return -1 with errno set to [EIO]; if this error is returned, the state of fildes is unspecified.
- close.20
The last process to close a terminal device file shall cause any output to be sent to the device and any input to be discarded. If HUPCL is set in the control modes and the communications port supports a disconnect function, the terminal device shall perform a disconnect.
- close.21
If a modem disconnect is detected by the terminal interface for a controlling terminal, and if CLOCAL is not set in the c_cflag field for the terminal (see Control Modes), the SIGHUP signal shall be sent to the controlling process for which the terminal is the controlling terminal.
- [+]creat (41 / 0 / 0)
- creat.01
The function call:creat(path, mode)shall be equivalent to:open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)
- app.creat.open.06.06
When bits other than the file permission bits are set, the effect is unspecified.
- creat.open.01
The open() function shall establish the connection between a file and a file descriptor. It shall create an open file description that refers to a file and a file descriptor that refers to that open file description.
- creat.open.02.01
The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.
- creat.open.02.02
The open file description is new, and therefore the file descriptor shall not share it with any other process in the system.
- creat.open.02.03
The FD_CLOEXEC file descriptor flag associated with the new file descriptor shall be cleared.
- creat.open.03
The file offset used to mark the current position within the file shall be set to the beginning of the file.
- creat.open.04
The file status flags and file access modes of the open file description shall be set according to the value of oflag.
- creat.open.06.02
Otherwise, the file shall be created;
- creat.open.06.03
the user ID of the file shall be set to the effective user ID of the process;
- creat.open.06.04
the group ID of the file shall be set to the group ID of the file's parent directory or to the effective group ID of the process;
- creat.open.06.05
and the access permission bits (see <sys/stat.h>) of the file mode shall be set to the value of the third argument taken as type mode_t modified as follows: a bitwise AND is performed on the file-mode bits and the corresponding bits in the complement of the process' file mode creation mask. Thus, all bits in the file mode whose corresponding bit in the file mode creation mask is set are cleared.
- creat.open.13.01
If the file exists and is a regular file, and the file is successfully opened O_RDWR or O_WRONLY, its length shall be truncated to 0, and the mode and owner shall be unchanged.
- creat.open.14
If O_CREAT is set and the file did not previously exist, upon successful completion, open() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file and the st_ctime and st_mtime fields of the parent directory.
- creat.open.15
If O_TRUNC is set and the file did previously exist, upon successful completion, open() shall mark for update the st_ctime and st_mtime fields of the file.
- creat.open.30.01
Upon successful completion, the function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor.
- creat.open.30.02
Otherwise, -1 shall be returned and errno set to indicate the error.
- creat.open.30.03
No files shall be created or modified if the function returns -1.
- creat.open.31
The open() function shall fail if:
- creat.open.31.01
[EACCES] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by oflag are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created, or O_TRUNC is specified and write permission is denied.
- creat.open.31.02
[EEXIST] O_CREAT and O_EXCL are set, and the named file exists.
- creat.open.31.03
[EINTR] A signal was caught during open().
- creat.open.31.04
[EINVAL] [SIO] The implementation does not support synchronized I/O for this file.
- creat.open.31.05
[EIO] [XSR] The path argument names a STREAMS file and a hangup or error occurred during the open().
- creat.open.31.06
[EISDIR] The named file is a directory and oflag includes O_WRONLY or O_RDWR.
- creat.open.31.07
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- creat.open.31.08
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- creat.open.31.09
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- creat.open.31.10
[ENFILE] The maximum allowable number of files is currently open in the system.
- creat.open.31.11
[ENOENT] O_CREAT is not set and the named file does not exist; or O_CREAT is set and either the path prefix does not exist or the path argument points to an empty string.
- creat.open.31.12
[ENOSR] [XSR] The path argument names a STREAMS-based file and the system is unable to allocate a STREAM.
- creat.open.31.13
[ENOSPC] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and O_CREAT is specified.
- creat.open.31.14
[ENOTDIR] A component of the path prefix is not a directory.
- creat.open.31.15
[ENXIO] O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and no process has the file open for reading.
- creat.open.31.16
[ENXIO] The named file is a character special or block special file, and the device associated with this special file does not exist.
- creat.open.31.17
[EOVERFLOW] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- creat.open.31.18
[EROFS] The named file resides on a read-only file system and either O_WRONLY, O_RDWR, O_CREAT (if the file does not exist), or O_TRUNC is set in the oflag argument.
- creat.open.32
The open() function may fail if:
- creat.open.32.01
[EAGAIN] [XSI] The path argument names the slave side of a pseudo-terminal device that is locked.
- creat.open.32.02
[EINVAL] The value of the oflag argument is not valid.
- creat.open.32.03
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- creat.open.32.04
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- creat.open.32.05
[ENOMEM] [XSR] The path argument names a STREAMS file and the system is unable to allocate resources.
- creat.open.32.06
[ETXTBSY] The file is a pure procedure (shared text) file that is being executed and oflag is O_WRONLY or O_RDWR.
- [+]creat64 (40 / 0 / 0)
- creat64.open.01
The open() function shall establish the connection between a file and a file descriptor. It shall create an open file description that refers to a file and a file descriptor that refers to that open file description.
- creat64.open.02.01
The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.
- creat64.open.02.02
The open file description is new, and therefore the file descriptor shall not share it with any other process in the system.
- creat64.open.02.03
The FD_CLOEXEC file descriptor flag associated with the new file descriptor shall be cleared.
- creat64.open.03
The file offset used to mark the current position within the file shall be set to the beginning of the file.
- creat64.open.04
The file status flags and file access modes of the open file description shall be set according to the value of oflag.
- creat64.open.06.02
Otherwise, the file shall be created;
- creat64.open.06.03
the user ID of the file shall be set to the effective user ID of the process;
- creat64.open.06.04
the group ID of the file shall be set to the group ID of the file's parent directory or to the effective group ID of the process;
- creat64.open.06.05
and the access permission bits (see <sys/stat.h>) of the file mode shall be set to the value of the third argument taken as type mode_t modified as follows: a bitwise AND is performed on the file-mode bits and the corresponding bits in the complement of the process' file mode creation mask. Thus, all bits in the file mode whose corresponding bit in the file mode creation mask is set are cleared.
- creat64.open.13.01
If the file exists and is a regular file, and the file is successfully opened O_RDWR or O_WRONLY, its length shall be truncated to 0, and the mode and owner shall be unchanged.
- creat64.open.14
If O_CREAT is set and the file did not previously exist, upon successful completion, open() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file and the st_ctime and st_mtime fields of the parent directory.
- creat64.open.15
If O_TRUNC is set and the file did previously exist, upon successful completion, open() shall mark for update the st_ctime and st_mtime fields of the file.
- creat64.open.30.01
Upon successful completion, the function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor.
- creat64.open.30.02
Otherwise, -1 shall be returned and errno set to indicate the error.
- creat64.open.30.03
No files shall be created or modified if the function returns -1.
- creat64.open.31
The open() function shall fail if:
- creat64.open.31.01
[EACCES] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by oflag are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created, or O_TRUNC is specified and write permission is denied.
- creat64.open.31.02
[EEXIST] O_CREAT and O_EXCL are set, and the named file exists.
- creat64.open.31.03
[EINTR] A signal was caught during open().
- creat64.open.31.04
[EINVAL] [SIO] The implementation does not support synchronized I/O for this file.
- creat64.open.31.05
[EIO] [XSR] The path argument names a STREAMS file and a hangup or error occurred during the open().
- creat64.open.31.06
[EISDIR] The named file is a directory and oflag includes O_WRONLY or O_RDWR.
- creat64.open.31.07
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- creat64.open.31.08
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- creat64.open.31.09
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- creat64.open.31.10
[ENFILE] The maximum allowable number of files is currently open in the system.
- creat64.open.31.11
[ENOENT] O_CREAT is not set and the named file does not exist; or O_CREAT is set and either the path prefix does not exist or the path argument points to an empty string.
- creat64.open.31.12
[ENOSR] [XSR] The path argument names a STREAMS-based file and the system is unable to allocate a STREAM.
- creat64.open.31.13
[ENOSPC] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and O_CREAT is specified.
- creat64.open.31.14
[ENOTDIR] A component of the path prefix is not a directory.
- creat64.open.31.15
[ENXIO] O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and no process has the file open for reading.
- creat64.open.31.16
[ENXIO] The named file is a character special or block special file, and the device associated with this special file does not exist.
- creat64.open.31.17
[EOVERFLOW] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- creat64.open.31.18
[EROFS] The named file resides on a read-only file system and either O_WRONLY, O_RDWR, O_CREAT (if the file does not exist), or O_TRUNC is set in the oflag argument.
- creat64.open.32
The open() function may fail if:
- creat64.open.32.01
[EAGAIN] [XSI] The path argument names the slave side of a pseudo-terminal device that is locked.
- creat64.open.32.02
[EINVAL] The value of the oflag argument is not valid.
- creat64.open.32.03
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- creat64.open.32.04
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- creat64.open.32.05
[ENOMEM] [XSR] The path argument names a STREAMS file and the system is unable to allocate resources.
- creat64.open.32.06
[ETXTBSY] The file is a pure procedure (shared text) file that is being executed and oflag is O_WRONLY or O_RDWR.
- app.creat64.open.06.06
When bits other than the file permission bits are set, the effect is unspecified.
- [+]dup (8 / 6 / 0)
- dup.01
The dup() and dup2() functions provide an alternative interface to the service provided by fcntl() using the F_DUPFD command. The call:fid = dup(fildes);shall be equivalent to:fid = fcntl(fildes, F_DUPFD, 0);
- dup.06.01
Upon successful completion a non-negative integer, namely the file descriptor, shall be returned;
- dup.06.02
otherwise, -1 shall be returned and errno set to indicate the error.
- dup.07
The dup() function shall fail if:
- dup.07.01
[EBADF] The fildes argument is not a valid open file descriptor.
- dup.07.02
[EMFILE] The number of file descriptors in use by this process would exceed {OPEN_MAX}.
- dup.fcntl.01.01.01
Return a new file descriptor which shall be the lowest numbered available (that is, not already open) file descriptor greater than or equal to the third argument, arg, taken as an integer of type int.
- dup.fcntl.01.01.02
The new file descriptor shall refer to the same open file description as the original file descriptor, and shall share any locks.
- dup.fcntl.01.01.03
The FD_CLOEXEC flag associated with the new file descriptor shall be cleared to keep the file open across calls to one of the exec functions.
- app.dup.fcntl.27
If fildes refers to a typed memory object, the result of the fcntl() function is unspecified.
- [+]dup2 (13 / 10 / 0)
- dup2.01
The call:fid = dup2(fildes, fildes2);shall be equivalent to:close(fildes2);fid = fcntl(fildes, F_DUPFD, fildes2);
- dup2.02
If fildes2 is less than 0 or greater than or equal to {OPEN_MAX}, dup2() shall return -1 with errno set to [EBADF].
- dup2.03
If fildes is a valid file descriptor and is equal to fildes2, dup2() shall return fildes2 without closing it.
- dup2.04
If fildes is not a valid file descriptor, dup2() shall return -1 and shall not close fildes2.
- dup2.05.01
The value returned shall be equal to the value of fildes2 upon successful completion,
- dup2.05.02
or -1 upon failure.
- dup2.06.01
Upon successful completion a non-negative integer, namely the file descriptor, shall be returned;
- dup2.06.02
otherwise, -1 shall be returned and errno set to indicate the error.
- dup2.07
The dup2() function shall fail if:
- dup2.07.01
[EBADF] The fildes argument is not a valid open file descriptor or the argument fildes2 is negative or greater than or equal to {OPEN_MAX}.
- dup2.07.02
[EINTR] The dup2() function was interrupted by a signal.
- app.dup2.fcntl.27
If fildes refers to a typed memory object, the result of the fcntl() function is unspecified.
- dup2.fcntl.01.01.01
Return a new file descriptor which shall be the lowest numbered available (that is, not already open) file descriptor greater than or equal to the third argument, arg, taken as an integer of type int.
- dup2.fcntl.01.01.02
The new file descriptor shall refer to the same open file description as the original file descriptor, and shall share any locks.
- dup2.fcntl.01.01.03
The FD_CLOEXEC flag associated with the new file descriptor shall be cleared to keep the file open across calls to one of the exec functions.
- [+]fcntl (79 / 51 / 0)
- fcntl.01
The fcntl() function shall perform the operations described below on open files. The fildes argument is a file descriptor.The available values for cmd are defined in <fcntl.h> and are as follows:
- fcntl.01.01
F_DUPFD
- fcntl.01.01.01
Return a new file descriptor which shall be the lowest numbered available (that is, not already open) file descriptor greater than or equal to the third argument, arg, taken as an integer of type int.
- fcntl.01.01.02
The new file descriptor shall refer to the same open file description as the original file descriptor, and shall share any locks.
- fcntl.01.01.03
The FD_CLOEXEC flag associated with the new file descriptor shall be cleared to keep the file open across calls to one of the exec functions.
- fcntl.01.02
F_GETFD
- fcntl.01.02.01
Get the file descriptor flags defined in <fcntl.h> that are associated with the file descriptor fildes.
- fcntl.01.02.02
File descriptor flags are associated with a single file descriptor and do not affect other file descriptors that refer to the same file.
- fcntl.01.03
F_SETFD
- fcntl.01.03.01
Set the file descriptor flags defined in <fcntl.h>, that are associated with fildes, to the third argument, arg, taken as type int.
- fcntl.01.03.02
If the FD_CLOEXEC flag in the third argument is 0, the file shall remain open across the exec functions;
- fcntl.01.03.03
otherwise, the file shall be closed upon successful execution of one of the exec functions.
- fcntl.01.04
F_GETFL
- fcntl.01.04.01
Get the file status flags and file access modes, defined in <fcntl.h>, for the file description associated with fildes.
- fcntl.01.04.02
The file access modes can be extracted from the return value using the mask O_ACCMODE, which is defined in <fcntl.h>.
- fcntl.01.04.03
File status flags and file access modes are associated with the file description and do not affect other file descriptors that refer to the same file with different open file descriptions.
- fcntl.01.05
F_SETFL
- fcntl.01.05.01
Set the file status flags, defined in <fcntl.h>, for the file description associated with fildes from the corresponding bits in the third argument, arg, taken as type int.
- fcntl.01.05.02
Bits corresponding to the file access mode and the file creation flags, as defined in <fcntl.h>, that are set in arg shall be ignored.
- fcntl.01.06
F_GETOWN
- fcntl.01.06.01
If fildes refers to a socket, get the process or process group ID specified to receive SIGURG signals when out-of-band data is available.
- fcntl.01.06.02
Positive values indicate a process ID; negative values, other than -1, indicate a process group ID.
- fcntl.01.07
F_SETOWN
- fcntl.01.07.01
If fildes refers to a socket, set the process or process group ID specified to receive SIGURG signals when out-of-band data is available, using the value of the third argument, arg, taken as type int.
- fcntl.01.07.02
Positive values indicate a process ID; negative values, other than -1, indicate a process group ID.
- app.fcntl.01.05.03
If any bits in arg other than those mentioned here are changed by the application, the result is unspecified.
- app.fcntl.01.06.03
If fildes does not refer to a socket, the results are unspecified.
- app.fcntl.01.07.03
If fildes does not refer to a socket, the results are unspecified.
- fcntl.02
The following values for cmd are available for advisory record locking. Record locking shall be supported for regular files, and may be supported for other files.
- fcntl.02.01
F_GETLK
- fcntl.02.01.01
Get the first lock which blocks the lock description pointed to by the third argument, arg, taken as a pointer to type struct flock, defined in <fcntl.h>.
- fcntl.02.01.02
The information retrieved shall overwrite the information passed to fcntl() in the structure flock.
- fcntl.02.01.03
If no lock is found that would prevent this lock from being created, then the structure shall be left unchanged except for the lock type which shall be set to F_UNLCK.
- fcntl.02.02
F_SETLK
- fcntl.02.02.01
Set or clear a file segment lock according to the lock description pointed to by the third argument, arg, taken as a pointer to type struct flock, defined in <fcntl.h>.
- fcntl.02.02.02
F_SETLK can establish shared (or read) locks (F_RDLCK) or exclusive (or write) locks (F_WRLCK), as well as to remove either type of lock (F_UNLCK). F_RDLCK, F_WRLCK, and F_UNLCK are defined in <fcntl.h>.
- fcntl.02.02.03
If a shared or exclusive lock cannot be set, fcntl() shall return immediately with a return value of -1.
- fcntl.02.03
F_SETLKW
- fcntl.02.03.01
This command shall be equivalent to F_SETLK except that if a shared or exclusive lock is blocked by other locks, the thread shall wait until the request can be satisfied.
- fcntl.02.03.02
If a signal that is to be caught is received while fcntl() is waiting for a region, fcntl() shall be interrupted.
- fcntl.02.03.03
Upon return from the signal handler, fcntl() shall return -1 with errno set to [EINTR], and the lock operation shall not be done.
- fcntl.03
When a shared lock is set on a segment of a file, other processes shall be able to set shared locks on that segment or a portion of it.
- fcntl.04
A shared lock prevents any other process from setting an exclusive lock on any portion of the protected area.
- fcntl.05
A request for a shared lock shall fail if the file descriptor was not opened with read access.
- fcntl.06
An exclusive lock shall prevent any other process from setting a shared lock or an exclusive lock on any portion of the protected area.
- fcntl.07
A request for an exclusive lock shall fail if the file descriptor was not opened with write access.
- fcntl.08
The value of l_whence is SEEK_SET, SEEK_CUR, or SEEK_END, to indicate that the relative offset l_start bytes shall be measured from the start of the file, current position, or end of the file, respectively.
- fcntl.09
The value of l_len is the number of consecutive bytes to be locked. The value of l_len may be negative (where the definition of off_t permits negative values of l_len).
- fcntl.10
The l_pid field is only used with F_GETLK to return the process ID of the process holding a blocking lock.
- fcntl.11
After a successful F_GETLK request, when a blocking lock is found, the values returned in the flock structure shall be as follows:
- fcntl.11.01
l_type Type of blocking lock found.
- fcntl.11.02
l_whence SEEK_SET.
- fcntl.11.03
l_start Start of the blocking lock.
- fcntl.11.04
l_len Length of the blocking lock.
- fcntl.11.05
l_pid Process ID of the process that holds the blocking lock.
- fcntl.12
If the command is F_SETLKW and the process must wait for another process to release a lock, then the range of bytes to be locked shall be determined before the fcntl() function blocks.
- fcntl.13
If the file size or file descriptor seek offset change while fcntl() is blocked, this shall not affect the range of bytes locked.
- fcntl.14
If l_len is positive, the area affected shall start at l_start and end at l_start+ l_len-1.
- fcntl.15
If l_len is negative, the area affected shall start at l_start+ l_len and end at l_start-1.
- fcntl.16.01
Locks may start and extend beyond the current end of a file,
- fcntl.16.02
but shall not extend before the beginning of the file.
- fcntl.17
A lock shall be set to extend to the largest possible value of the file offset for that file by setting l_len to 0.
- fcntl.18
If such a lock also has l_start set to 0 and l_whence is set to SEEK_SET, the whole file shall be locked.
- fcntl.19
There shall be at most one type of lock set for each byte in the file.
- fcntl.20
Before a successful return from an F_SETLK or an F_SETLKW request when the calling process has previously existing locks on bytes in the region specified by the request, the previous lock type for each byte in the specified region shall be replaced by the new lock type.
- fcntl.21
As specified above under the descriptions of shared locks and exclusive locks, an F_SETLK or an F_SETLKW request (respectively) shall fail or block when another process has existing locks on bytes in the specified region and the type of any of those locks conflicts with the type specified in the request.
- fcntl.22
All locks associated with a file for a given process shall be removed when a file descriptor for that file is closed by that process or the process holding that file descriptor terminates.
- fcntl.23.01
Locks are not inherited by a child process.
- fcntl.23.02
A potential for deadlock occurs if a process controlling a locked region is put to sleep by attempting to lock another process' locked region. If the system detects that sleeping until a locked region is unlocked would cause a deadlock, fcntl() shall fail with an [EDEADLK] error.
- fcntl.24
An unlock (F_UNLCK) request in which l_len is non-zero and the offset of the last byte of the requested segment is the maximum value for an object of type off_t, when the process has an existing lock in which l_len is 0 and which includes the last byte of the requested segment, shall be treated as a request to unlock from the start of the requested segment with an l_len equal to 0.
- fcntl.25
Otherwise, an unlock (F_UNLCK) request shall attempt to unlock only the requested segment.
- app.fcntl.26
[SHM] When the file descriptor fildes refers to a shared memory object, the behavior of fcntl() shall be the same as for a regular file except the effect of the following values for the argument cmd shall be unspecified: F_SETFL, F_GETLK, F_SETLK, and F_SETLKW.
- app.fcntl.27
If fildes refers to a typed memory object, the result of the fcntl() function is unspecified.
- fcntl.28
Upon successful completion, the value returned shall depend on cmd as follows:
- fcntl.28.01
F_DUPFD A new file descriptor.
- fcntl.28.02
F_GETFD Value of flags defined in <fcntl.h>. The return value shall not be negative.
- fcntl.28.03
F_SETFD Value other than -1.
- fcntl.28.04
F_GETFL Value of file status flags and access modes. The return value is not negative.
- fcntl.28.05
F_SETFL Value other than -1.
- fcntl.28.06
F_GETLK Value other than -1.
- fcntl.28.07
F_SETLK Value other than -1.
- fcntl.28.08
F_SETLKW Value other than -1.
- fcntl.28.09
F_GETOWN Value of the socket owner process or process group; this will not be -1.
- fcntl.28.10
F_SETOWN Value other than -1.
- fcntl.29
Otherwise, -1 shall be returned and errno set to indicate the error.
- fcntl.30
The fcntl() function shall fail if:
- fcntl.30.01
[EACCES] or [EAGAIN] The cmd argument is F_SETLK; the type of lock ( l_type) is a shared (F_RDLCK) or exclusive (F_WRLCK) lock and the segment of a file to be locked is already exclusive-locked by another process, or the type is an exclusive lock and some portion of the segment of a file to be locked is already shared-locked or exclusive-locked by another process.
- fcntl.30.02
[EBADF]
- fcntl.30.02.01
The fildes argument is not a valid open file descriptor,
- fcntl.30.02.02
or the argument cmd is F_SETLK or F_SETLKW, the type of lock, l_type, is a shared lock (F_RDLCK), and fildes is not a valid file descriptor open for reading,
- fcntl.30.02.03
or the type of lock, l_type, is an exclusive lock (F_WRLCK), and fildes is not a valid file descriptor open for writing.
- fcntl.30.03
[EINTR] The cmd argument is F_SETLKW and the function was interrupted by a signal.
- fcntl.30.04
[EINVAL] The cmd argument is invalid, or the cmd argument is F_DUPFD and arg is negative or greater than or equal to {OPEN_MAX}, or the cmd argument is F_GETLK, F_SETLK, or F_SETLKW and the data pointed to by arg is not valid, or fildes refers to a file that does not support locking.
- fcntl.30.05
[EMFILE]
- fcntl.30.05.01
The argument cmd is F_DUPFD and {OPEN_MAX} file descriptors are currently open in the calling process,
- fcntl.30.05.02
or no file descriptors greater than or equal to arg are available.
- fcntl.30.06
[ENOLCK] The argument cmd is F_SETLK or F_SETLKW and satisfying the lock or unlock request would result in the number of locked regions in the system exceeding a system-imposed limit.
- fcntl.30.07
[EOVERFLOW] One of the values to be returned cannot be represented correctly.
- fcntl.30.08
[EOVERFLOW] The cmd argument is F_GETLK, F_SETLK, or F_SETLKW and the smallest or, if l_len is non-zero, the largest offset of any byte in the requested segment cannot be represented correctly in an object of type off_t.
- fcntl.31
The fcntl() function may fail if:
- fcntl.31.01
[EDEADLK] The cmd argument is F_SETLKW, the lock is blocked by a lock from another process, and putting the calling process to sleep to wait for that lock to become free would cause a deadlock.
- fcntl.60
According to ISO POSIX (2003), only an application sets fcntl() flags, for example O_LARGEFILE. However, this specification also allows an implementation to set the O_LARGEFILE flag in the case where the programming environment is one of _POSIX_V6_ILP32_OFFBIG, _POSIX_V6_LP64_OFF64, _POSIX_V6_LPBIG_OFFBIG. See getconf and c99 in ISO POSIX (2003) for a description of these environments. Thus, calling fcntl() with the F_GETFL command may return O_LARGEFILE as well as flags explicitly set by the application in the case that both the implementation and the application support an off_t of at least 64 bits.
- [+]fdatasync (8 / 2 / 0)
- fdatasync.01
The fdatasync() function shall force all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state.
- fdatasync.02
The functionality shall be equivalent to fsync() with the symbol _POSIX_SYNCHRONIZED_IO defined, with the exception that all I/O operations shall be completed as defined for synchronized I/O data integrity completion.
- fdatasync.03.01
If successful, the fdatasync() function shall return the value 0;
- fdatasync.03.02
otherwise, the function shall return the value -1 and set errno to indicate the error.
- fdatasync.04
If the fdatasync() function fails, outstanding I/O operations are not guaranteed to have been completed.
- fdatasync.05
The fdatasync() function shall fail if:
- fdatasync.05.01
[EBADF] The fildes argument is not a valid file descriptor open for writing.
- fdatasync.05.02
[EINVAL] This implementation does not support synchronized I/O for this file.
- fdatasync.06
In the event that any of the queued I/O operations fail, fdatasync() shall return the error conditions defined for read() and write().
- [+]flock (9 / 8 / 0)
- flock.01
flock() applies or removes an advisory lock on the open file fd.
- flock.02
Shared lock. More than one process may hold a shared lock for a given file at a given time.
- flock.03
Exclusive lock. Only one process may hold an exclusive lock for a given file at a given time.
- flock.04
A single file may not simultaneously have both shared and exclusive locks.
- flock.05.01
On success, 0 is returned.
- flock.05.02
On error, -1 is returned and the global variable errno is set appropriately.
- flock.06
[EWOULDBLOCK]
- flock.07
Unlock.
- flock.08
Don't block when locking. May be specified (by oring) along with one of the other operations.
- [+]fsync (11 / 2 / 0)
- fsync.01
The fsync() function shall request that all data for the open file descriptor named by fildes is to be transferred to the storage device associated with the file described by fildes.
- fsync.02
The fsync() function shall not return until the system has completed that action or until an error is detected.
- fsync.03
If _POSIX_SYNCHRONIZED_IO is defined, the fsync() function shall force all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state.
- fsync.04
All I/O operations shall be completed as defined for synchronized I/O file integrity completion.
- fsync.05.01
Upon successful completion, fsync() shall return 0.
- fsync.05.02
Otherwise, -1 shall be returned and errno set to indicate the error.
- fsync.05.03
If the fsync() function fails, outstanding I/O operations are not guaranteed to have been completed.
- fsync.06
The fsync() function shall fail if:
- fsync.06.01
[EBADF] The fildes argument is not a valid descriptor.
- fsync.06.02
[EINTR] The fsync() function was interrupted by a signal.
- fsync.06.03
[EINVAL] The fildes argument does not refer to a file on which this operation is possible.
- fsync.06.04
[EIO] An I/O error occurred while reading from or writing to the file system.
- [+]ftruncate (26 / 13 / 0)
- ftruncate.01
If fildes is not a valid file descriptor open for writing, the ftruncate() function shall fail.
- ftruncate.02
If fildes refers to a regular file, the ftruncate() function shall cause the size of the file to be truncated to length.
- ftruncate.03
If the size of the file previously exceeded length, the extra data shall no longer be available to reads on the file.
- ftruncate.04
If the file previously was smaller than this size, ftruncate() shall either increase the size of the file or fail.
- ftruncate.05.01
If the file size is increased, the extended area shall appear as if it were zero-filled.
- ftruncate.05.02
The value of the seek pointer shall not be modified by a call to ftruncate().
- ftruncate.06.01
Upon successful completion, if fildes refers to a regular file, the ftruncate() function shall mark for update the st_ctime and st_mtime fields of the file
- ftruncate.06.02
and the S_ISUID and S_ISGID bits of the file mode may be cleared.
- ftruncate.07
If the ftruncate() function is unsuccessful, the file is unaffected.
- ftruncate.08
If fildes refers to a directory, ftruncate() shall fail.
- app.ftruncate.09
If fildes refers to any other file type, except a shared memory object, the result is unspecified.
- ftruncate.10
If fildes refers to a shared memory object, ftruncate() shall set the size of the shared memory object to length.
- ftruncate.11
If the effect of ftruncate() is to decrease the size of a shared memory object or memory mapped file and whole pages beyond the new end were previously mapped, then the whole pages beyond the new end shall be discarded.
- ftruncate.12
If the Memory Protection option is supported, references to discarded pages shall result in the generation of a SIGBUS signal; otherwise, the result of such references is undefined.
- ftruncate.13.01
Upon successful completion, ftruncate() shall return 0;
- ftruncate.13.02
otherwise, -1 shall be returned and errno set to indicate the error.
- ftruncate.14
The ftruncate() function shall fail if:
- ftruncate.14.01
[EINTR] A signal was caught during execution.
- ftruncate.14.02
[EINVAL] The length argument was less than 0.
- ftruncate.14.03
[EFBIG] or [EINVAL] The length argument was greater than the maximum file size.
- ftruncate.14.04
[EFBIG] [XSI] The file is a regular file and length is greater than the offset maximum established in the open file description associated with fildes.
- ftruncate.14.05
[EIO] An I/O error occurred while reading from or writing to a file system.
- ftruncate.14.06
[EBADF] or [EINVAL] The fildes argument is not a file descriptor open for writing.
- ftruncate.14.07
[EINVAL] The fildes argument references a file that was opened without write permission.
- ftruncate.14.08
[EROFS] The named file resides on a read-only file system.
- ftruncate.15
If the request would cause the file size to exceed the soft file size limit for the process, the request shall fail and the implementation shall generate the SIGXFSZ signal for the thread.
- ftruncate.16
If the effect of ftruncate() is to increase the size of a shared memory object, it is unspecified whether the contents of any mapped pages between the old end-of-file and the new are flushed to the underlying object.
- ftruncate.17
XSI-conformant systems shall increase the size of the file.
- [+]ftruncate64 (27 / 0 / 0)
- ftruncate64.ftruncate.01
If fildes is not a valid file descriptor open for writing, the ftruncate() function shall fail.
- ftruncate64.ftruncate.02
If fildes refers to a regular file, the ftruncate() function shall cause the size of the file to be truncated to length.
- ftruncate64.ftruncate.03
If the size of the file previously exceeded length, the extra data shall no longer be available to reads on the file.
- ftruncate64.ftruncate.04
If the file previously was smaller than this size, ftruncate() shall either increase the size of the file or fail.
- ftruncate64.ftruncate.05.01
If the file size is increased, the extended area shall appear as if it were zero-filled.
- ftruncate64.ftruncate.05.02
The value of the seek pointer shall not be modified by a call to ftruncate().
- ftruncate64.ftruncate.06.01
Upon successful completion, if fildes refers to a regular file, the ftruncate() function shall mark for update the st_ctime and st_mtime fields of the file
- ftruncate64.ftruncate.06.02
and the S_ISUID and S_ISGID bits of the file mode may be cleared.
- ftruncate64.ftruncate.07
If the ftruncate() function is unsuccessful, the file is unaffected.
- ftruncate64.ftruncate.08
If fildes refers to a directory, ftruncate() shall fail.
- ftruncate64.ftruncate.09
If fildes refers to any other file type, except a shared memory object, the result is unspecified.
- ftruncate64.ftruncate.10
If fildes refers to a shared memory object, ftruncate() shall set the size of the shared memory object to length.
- ftruncate64.ftruncate.11
If the effect of ftruncate() is to decrease the size of a shared memory object or memory mapped file and whole pages beyond the new end were previously mapped, then the whole pages beyond the new end shall be discarded.
- ftruncate64.ftruncate.12
If the Memory Protection option is supported, references to discarded pages shall result in the generation of a SIGBUS signal; otherwise, the result of such references is undefined.
- ftruncate64.ftruncate.13.01
Upon successful completion, ftruncate() shall return 0;
- ftruncate64.ftruncate.13.02
otherwise, -1 shall be returned and errno set to indicate the error.
- ftruncate64.ftruncate.14
The ftruncate() function shall fail if:
- ftruncate64.ftruncate.14.01
[EINTR] A signal was caught during execution.
- ftruncate64.ftruncate.14.02
[EINVAL] The length argument was less than 0.
- ftruncate64.ftruncate.14.03
[EFBIG] or [EINVAL] The length argument was greater than the maximum file size.
- ftruncate64.ftruncate.14.04
[EFBIG] [XSI] The file is a regular file and length is greater than the offset maximum established in the open file description associated with fildes.
- ftruncate64.ftruncate.14.05
[EIO] An I/O error occurred while reading from or writing to a file system.
- ftruncate64.ftruncate.14.06
[EBADF] or [EINVAL] The fildes argument is not a file descriptor open for writing.
- ftruncate64.ftruncate.14.07
[EINVAL] The fildes argument references a file that was opened without write permission.
- ftruncate64.ftruncate.14.08
[EROFS] The named file resides on a read-only file system.
- ftruncate64.ftruncate.15
If the request would cause the file size to exceed the soft file size limit for the process, the request shall fail and the implementation shall generate the SIGXFSZ signal for the thread.
- ftruncate64.ftruncate.16
If the effect of ftruncate() is to increase the size of a shared memory object, it is unspecified whether the contents of any mapped pages between the old end-of-file and the new are flushed to the underlying object.
- ftruncate64.ftruncate.17
XSI-conformant systems shall increase the size of the file.
- [+]lockf (36 / 25 / 0)
- lockf.01
The lockf() function shall lock sections of a file with advisory-mode locks.
- lockf.02
Calls to lockf() from other threads which attempt to lock the locked file section shall either return an error value or block until the section becomes unlocked.
- lockf.03
All the locks for a process are removed when the process terminates.
- lockf.04
The fildes argument is an open file descriptor. To establish a lock with this function, the file descriptor shall be opened with write-only permission (O_WRONLY) or with read/write permission (O_RDWR).
- lockf.05
F_TEST shall detect if a lock by another process is present on the specified section.
- lockf.06
F_LOCK and F_TLOCK shall both lock a section of a file if the section is available.
- lockf.07
F_ULOCK shall remove locks from a section of the file.
- lockf.08
The size argument is the number of contiguous bytes to be locked or unlocked. The section to be locked or unlocked starts at the current offset in the file and extends forward for a positive size or backward for a negative size (the preceding bytes up to but not including the current offset).
- lockf.09
If size is 0, the section from the current offset through the largest possible file offset shall be locked (that is, from the current offset through the present or any future end-of-file).
- lockf.10
The sections locked with F_LOCK or F_TLOCK may, in whole or in part, contain or be contained by a previously locked section for the same process. When this occurs, or if adjacent locked sections would occur, the sections shall be combined into a single locked section.
- lockf.11
If the request would cause the number of locks to exceed a system-imposed limit, the request shall fail.
- lockf.12.01
F_LOCK shall block the calling thread until the section is available.
- lockf.12.02
F_TLOCK shall cause the function to fail if the section is already locked by another process.
- lockf.12.03
File locks shall be released on first close by the locking process of any file descriptor for the file.
- lockf.13
F_ULOCK requests may release (wholly or in part) one or more locked sections controlled by the process. Locked sections shall be unlocked starting at the current file offset through size bytes or to the end-of-file if size is (off_t)0.
- lockf.14
When all of a locked section is not released (that is, when the beginning or end of the area to be unlocked falls within a locked section), the remaining portions of that section shall remain locked by the process.
- lockf.15
Releasing the center portion of a locked section shall cause the remaining locked beginning and end portions to become two separate locked sections.
- lockf.16
Blocking on a section shall be interrupted by any signal.
- lockf.17.01
An F_ULOCK request in which size is non-zero and the offset of the last byte of the requested section is the maximum value for an object of type off_t, when the process has an existing lock in which size is 0 and which includes the last byte of the requested section, shall be treated as a request to unlock from the start of the requested section with a size equal to 0.
- lockf.17.02
Otherwise, an F_ULOCK request shall attempt to unlock only the requested section.
- lockf.18.01
Upon successful completion, lockf() shall return 0.
- lockf.18.02
Otherwise, it shall return -1, set errno to indicate an error,
- lockf.18.03
and existing locks shall not be changed.
- lockf.19
The lockf() function shall fail if:
- lockf.19.01
[EBADF] The fildes argument is not a valid open file descriptor; or function is F_LOCK or F_TLOCK and fildes is not a valid file descriptor open for writing.
- lockf.19.02
[EACCES] or [EAGAIN] The function argument is F_TLOCK or F_TEST and the section is already locked by another process.
- lockf.19.03
[EDEADLK] The function argument is F_LOCK and a deadlock is detected.
- lockf.19.04
[EINTR] A signal was caught during execution of the function.
- lockf.19.05
[EINVAL] The function argument is not one of F_LOCK, F_TLOCK, F_TEST, or F_ULOCK; or size plus the current file offset is less than 0.
- lockf.19.06
[EOVERFLOW] The offset of the first, or if size is not 0 then the last, byte in the requested section cannot be represented correctly in an object of type off_t.
- lockf.20
The lockf() function may fail if:
- lockf.20.01
[EAGAIN] The function argument is F_LOCK or F_TLOCK and the file is mapped with mmap().
- lockf.20.02
[EDEADLK] or [ENOLCK] The function argument is F_LOCK, F_TLOCK, or F_ULOCK, and the request would cause the number of locks to exceed a system-imposed limit.
- lockf.20.03
[EOPNOTSUPP] or [EINVAL] The implementation does not support the locking of files of the type indicated by the fildes argument.
- app.lockf.21
Record locking with lockf() shall be supported for regular files and may be supported for other files.
- lockf.22
An area need not be allocated to the file to be locked because locks may exist past the end-of-file.
- lockf.23
If the request would cause the number of locks in the system to exceed a system-imposed limit, the request shall fail.
- lockf.24
A potential for deadlock occurs if the threads of a process controlling a locked section are blocked by accessing another process' locked section. If the system detects that deadlock would occur, lockf() shall fail with an [EDEADLK] error.
- app.lockf.25
The interaction between fcntl() and lockf() locks is unspecified.
- lockf.26
Attempting to lock a section of a file that is associated with a buffered stream produces unspecified results.
- [+]lockf64 (36 / 12 / 0)
- lockf64.lockf.01
The lockf() function shall lock sections of a file with advisory-mode locks.
- lockf64.lockf.02
Calls to lockf() from other threads which attempt to lock the locked file section shall either return an error value or block until the section becomes unlocked.
- lockf64.lockf.03
All the locks for a process are removed when the process terminates.
- lockf64.lockf.04
The fildes argument is an open file descriptor. To establish a lock with this function, the file descriptor shall be opened with write-only permission (O_WRONLY) or with read/write permission (O_RDWR).
- lockf64.lockf.05
F_TEST shall detect if a lock by another process is present on the specified section.
- lockf64.lockf.06
F_LOCK and F_TLOCK shall both lock a section of a file if the section is available.
- lockf64.lockf.07
F_ULOCK shall remove locks from a section of the file.
- lockf64.lockf.08
The size argument is the number of contiguous bytes to be locked or unlocked. The section to be locked or unlocked starts at the current offset in the file and extends forward for a positive size or backward for a negative size (the preceding bytes up to but not including the current offset).
- lockf64.lockf.09
If size is 0, the section from the current offset through the largest possible file offset shall be locked (that is, from the current offset through the present or any future end-of-file).
- lockf64.lockf.10
The sections locked with F_LOCK or F_TLOCK may, in whole or in part, contain or be contained by a previously locked section for the same process. When this occurs, or if adjacent locked sections would occur, the sections shall be combined into a single locked section.
- lockf64.lockf.11
If the request would cause the number of locks to exceed a system-imposed limit, the request shall fail.
- lockf64.lockf.12.01
F_LOCK shall block the calling thread until the section is available.
- lockf64.lockf.12.02
F_TLOCK shall cause the function to fail if the section is already locked by another process.
- lockf64.lockf.12.03
File locks shall be released on first close by the locking process of any file descriptor for the file.
- lockf64.lockf.13
F_ULOCK requests may release (wholly or in part) one or more locked sections controlled by the process. Locked sections shall be unlocked starting at the current file offset through size bytes or to the end-of-file if size is (off_t)0.
- lockf64.lockf.14
When all of a locked section is not released (that is, when the beginning or end of the area to be unlocked falls within a locked section), the remaining portions of that section shall remain locked by the process.
- lockf64.lockf.15
Releasing the center portion of a locked section shall cause the remaining locked beginning and end portions to become two separate locked sections.
- lockf64.lockf.16
Blocking on a section shall be interrupted by any signal.
- lockf64.lockf.17.01
An F_ULOCK request in which size is non-zero and the offset of the last byte of the requested section is the maximum value for an object of type off_t, when the process has an existing lock in which size is 0 and which includes the last byte of the requested section, shall be treated as a request to unlock from the start of the requested section with a size equal to 0.
- lockf64.lockf.17.02
Otherwise, an F_ULOCK request shall attempt to unlock only the requested section.
- lockf64.lockf.18.01
Upon successful completion, lockf() shall return 0.
- lockf64.lockf.18.02
Otherwise, it shall return -1, set errno to indicate an error,
- lockf64.lockf.18.03
and existing locks shall not be changed.
- lockf64.lockf.19
The lockf() function shall fail if:
- lockf64.lockf.19.01
[EBADF] The fildes argument is not a valid open file descriptor; or function is F_LOCK or F_TLOCK and fildes is not a valid file descriptor open for writing.
- lockf64.lockf.19.02
[EACCES] or [EAGAIN] The function argument is F_TLOCK or F_TEST and the section is already locked by another process.
- lockf64.lockf.19.03
[EDEADLK] The function argument is F_LOCK and a deadlock is detected.
- lockf64.lockf.19.04
[EINTR] A signal was caught during execution of the function.
- lockf64.lockf.19.05
[EINVAL] The function argument is not one of F_LOCK, F_TLOCK, F_TEST, or F_ULOCK; or size plus the current file offset is less than 0.
- lockf64.lockf.19.06
[EOVERFLOW] The offset of the first, or if size is not 0 then the last, byte in the requested section cannot be represented correctly in an object of type off_t.
- lockf64.lockf.20
The lockf() function may fail if:
- lockf64.lockf.20.01
[EAGAIN] The function argument is F_LOCK or F_TLOCK and the file is mapped with mmap().
- lockf64.lockf.20.02
[EDEADLK] or [ENOLCK] The function argument is F_LOCK, F_TLOCK, or F_ULOCK, and the request would cause the number of locks to exceed a system-imposed limit.
- lockf64.lockf.20.03
[EOPNOTSUPP] or [EINVAL] The implementation does not support the locking of files of the type indicated by the fildes argument.
- lockf64.lockf.22
An area need not be allocated to the file to be locked because locks may exist past the end-of-file.
- lockf64.lockf.23
If the request would cause the number of locks in the system to exceed a system-imposed limit, the request shall fail.
- lockf64.lockf.24
A potential for deadlock occurs if the threads of a process controlling a locked section are blocked by accessing another process' locked section. If the system detects that deadlock would occur, lockf() shall fail with an [EDEADLK] error.
- lockf64.lockf.26
Attempting to lock a section of a file that is associated with a buffered stream produces unspecified results.
- app.lockf64.lockf.21
Record locking with lockf() shall be supported for regular files and may be supported for other files.
- app.lockf64.lockf.25
The interaction between fcntl() and lockf() locks is unspecified.
- [+]lseek (13 / 8 / 0)
- lseek.01
If whence is SEEK_SET, the file offset shall be set to offset bytes.
- lseek.02
If whence is SEEK_CUR, the file offset shall be set to its current location plus offset.
- lseek.03
If whence is SEEK_END, the file offset shall be set to the size of the file plus offset.
- lseek.04
The lseek() function shall allow the file offset to be set beyond the end of the existing data in the file.
- lseek.05
If data is later written at this point, subsequent reads of data in the gap shall return bytes with the value 0 until data is actually written into the gap.
- lseek.06
The lseek() function shall not, by itself, extend the size of a file.
- app.lseek.07.01
If fildes refers to a shared memory object, the result of the lseek() function is unspecified.
- app.lseek.07.02
If fildes refers to a typed memory object, the result of the lseek() function is unspecified.
- lseek.08.01
Upon successful completion, the resulting offset, as measured in bytes from the beginning of the file, shall be returned.
- lseek.08.02
Otherwise, (off_t)-1 shall be returned, errno shall be set to indicate the error,
- lseek.08.03
and the file offset shall remain unchanged.
- lseek.09
The lseek() function shall fail if:
- lseek.09.01
[EBADF] The fildes argument is not an open file descriptor.
- lseek.09.02
[EINVAL] The whence argument is not a proper value, or the resulting file offset would be negative for a regular file, block special file, or directory.
- lseek.09.03
[EOVERFLOW] The resulting file offset would be a value which cannot be represented correctly in an object of type off_t.
- lseek.09.04
[ESPIPE] The fildes argument is associated with a pipe, FIFO, or socket.
- app.lseek.10
The behavior of lseek() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- [+]lseek64 (13 / 0 / 0)
- lseek64.lseek.01
If whence is SEEK_SET, the file offset shall be set to offset bytes.
- lseek64.lseek.02
If whence is SEEK_CUR, the file offset shall be set to its current location plus offset.
- lseek64.lseek.03
If whence is SEEK_END, the file offset shall be set to the size of the file plus offset.
- lseek64.lseek.04
The lseek() function shall allow the file offset to be set beyond the end of the existing data in the file.
- lseek64.lseek.05
If data is later written at this point, subsequent reads of data in the gap shall return bytes with the value 0 until data is actually written into the gap.
- lseek64.lseek.06
The lseek() function shall not, by itself, extend the size of a file.
- lseek64.lseek.08.01
Upon successful completion, the resulting offset, as measured in bytes from the beginning of the file, shall be returned.
- lseek64.lseek.08.02
Otherwise, (off_t)-1 shall be returned, errno shall be set to indicate the error,
- lseek64.lseek.08.03
and the file offset shall remain unchanged.
- lseek64.lseek.09
The lseek() function shall fail if:
- lseek64.lseek.09.01
[EBADF] The fildes argument is not an open file descriptor.
- lseek64.lseek.09.02
[EINVAL] The whence argument is not a proper value, or the resulting file offset would be negative for a regular file, block special file, or directory.
- lseek64.lseek.09.03
[EOVERFLOW] The resulting file offset would be a value which cannot be represented correctly in an object of type off_t.
- lseek64.lseek.09.04
[ESPIPE] The fildes argument is associated with a pipe, FIFO, or socket.
- app.lseek64.lseek.07.01
If fildes refers to a shared memory object, the result of the lseek() function is unspecified.
- app.lseek64.lseek.07.02
If fildes refers to a typed memory object, the result of the lseek() function is unspecified.
- app.lseek64.lseek.10
The behavior of lseek() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- [+]open (64 / 13 / 0)
- open.01
The open() function shall establish the connection between a file and a file descriptor. It shall create an open file description that refers to a file and a file descriptor that refers to that open file description.
- open.02.01
The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.
- open.02.02
The open file description is new, and therefore the file descriptor shall not share it with any other process in the system.
- open.02.03
The FD_CLOEXEC file descriptor flag associated with the new file descriptor shall be cleared.
- open.03
The file offset used to mark the current position within the file shall be set to the beginning of the file.
- open.04
The file status flags and file access modes of the open file description shall be set according to the value of oflag.
- open.05
O_APPEND If set, the file offset shall be set to the end of the file prior to each write.
- app.open.06.06
When bits other than the file permission bits are set, the effect is unspecified.
- open.06.01
If the file exists, this flag has no effect except as noted under O_EXCL below.
- open.06.02
Otherwise, the file shall be created;
- open.06.03
the user ID of the file shall be set to the effective user ID of the process;
- open.06.04
the group ID of the file shall be set to the group ID of the file's parent directory or to the effective group ID of the process;
- open.06.05
and the access permission bits (see <sys/stat.h>) of the file mode shall be set to the value of the third argument taken as type mode_t modified as follows: a bitwise AND is performed on the file-mode bits and the corresponding bits in the complement of the process' file mode creation mask. Thus, all bits in the file mode whose corresponding bit in the file mode creation mask is set are cleared.
- open.07
O_DSYNC [SIO] Write I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- app.open.08.04
If O_EXCL is set and O_CREAT is not set, the result is undefined.
- open.08.01
If O_CREAT and O_EXCL are set, open() shall fail if the file exists.
- open.08.02
The check for the existence of the file and the creation of the file if it does not exist shall be atomic with respect to other threads executing open() naming the same filename in the same directory with O_EXCL and O_CREAT set.
- open.08.03
If O_EXCL and O_CREAT are set, and path names a symbolic link, open() shall fail and set errno to [EEXIST], regardless of the contents of the symbolic link.
- open.09
O_NOCTTY If set and path identifies a terminal device, open() shall not cause the terminal device to become the controlling terminal for the process.
- open.10.01.01
If O_NONBLOCK is set, an open() for reading-only shall return without delay.
- open.10.01.02
An open() for writing-only shall return an error if no process currently has the file open for reading.
- open.10.02.01
If O_NONBLOCK is clear, an open() for reading-only shall block the calling thread until a thread opens the file for writing.
- open.10.02.02
An open() for writing-only shall block the calling thread until a thread opens the file for reading.
- open.10.03
If O_NONBLOCK is set, the open() function shall return without blocking for the device to be ready or available.
- open.10.04
If O_NONBLOCK is clear, the open() function shall block the calling thread until the device is ready or available before returning.
- app.open.10.05
Otherwise, the behavior of O_NONBLOCK is unspecified.
- app.open.104
Values for oflag are constructed by a bitwise-inclusive OR of flags from the following list, defined in <fcntl.h>.>Applications shall specify exactly one of the first three values (file access modes) below in the value of oflag:O_RDONLY Open for reading only. O_WRONLY Open for writing only. O_RDWR Open for reading and writing. The result is undefined if this flag is applied to a FIFO.
- open.11.01
Read I/O operations on the file descriptor shall complete at the same level of integrity as specified by the O_DSYNC and O_SYNC flags.
- open.11.02
If both O_DSYNC and O_RSYNC are set in oflag, all I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- open.11.03
If both O_SYNC and O_RSYNC are set in flags, all I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- app.open.118
If path names the master side of a pseudo-terminal device, then it is unspecified whether open() locks the slave side so that it cannot be opened.
- open.12
O_SYNC [SIO] Write I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- open.13.01
If the file exists and is a regular file, and the file is successfully opened O_RDWR or O_WRONLY, its length shall be truncated to 0, and the mode and owner shall be unchanged.
- open.13.02
It shall have no effect on FIFO special files or terminal device files.
- app.open.13.03
Its effect on other file types is implementation-defined.
- app.open.13.04
The result of using O_TRUNC with O_RDONLY is undefined.
- open.14
If O_CREAT is set and the file did not previously exist, upon successful completion, open() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file and the st_ctime and st_mtime fields of the parent directory.
- open.15
If O_TRUNC is set and the file did previously exist, upon successful completion, open() shall mark for update the st_ctime and st_mtime fields of the file.
- open.16
If both the O_SYNC and O_DSYNC flags are set, the effect is as if only the O_SYNC flag was set.
- open.17
If path refers to a STREAMS file, oflag may be constructed from O_NONBLOCK OR'ed with either O_RDONLY, O_WRONLY, or O_RDWR. Other flag values are not applicable to STREAMS devices and shall have no effect on them.
- app.open.18
Conforming applications shall call unlockpt() before opening the slave side.
- open.19
The largest value that can be represented correctly in an object of type off_t shall be established as the offset maximum in the open file description.
- open.30.01
Upon successful completion, the function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor.
- open.30.02
Otherwise, -1 shall be returned and errno set to indicate the error.
- open.30.03
No files shall be created or modified if the function returns -1.
- open.31
The open() function shall fail if:
- open.31.01
[EACCES] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by oflag are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created, or O_TRUNC is specified and write permission is denied.
- open.31.02
[EEXIST] O_CREAT and O_EXCL are set, and the named file exists.
- open.31.03
[EINTR] A signal was caught during open().
- open.31.04
[EINVAL] [SIO] The implementation does not support synchronized I/O for this file.
- open.31.05
[EIO] [XSR] The path argument names a STREAMS file and a hangup or error occurred during the open().
- open.31.06
[EISDIR] The named file is a directory and oflag includes O_WRONLY or O_RDWR.
- open.31.07
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- open.31.08
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- open.31.09
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- open.31.10
[ENFILE] The maximum allowable number of files is currently open in the system.
- open.31.11
[ENOENT] O_CREAT is not set and the named file does not exist; or O_CREAT is set and either the path prefix does not exist or the path argument points to an empty string.
- open.31.12
[ENOSR] [XSR] The path argument names a STREAMS-based file and the system is unable to allocate a STREAM.
- open.31.13
[ENOSPC] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and O_CREAT is specified.
- open.31.14
[ENOTDIR] A component of the path prefix is not a directory.
- open.31.15
[ENXIO] O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and no process has the file open for reading.
- open.31.16
[ENXIO] The named file is a character special or block special file, and the device associated with this special file does not exist.
- open.31.17
[EOVERFLOW] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- open.31.18
[EROFS] The named file resides on a read-only file system and either O_WRONLY, O_RDWR, O_CREAT (if the file does not exist), or O_TRUNC is set in the oflag argument.
- open.32
The open() function may fail if:
- open.32.01
[EAGAIN] [XSI] The path argument names the slave side of a pseudo-terminal device that is locked.
- open.32.02
[EINVAL] The value of the oflag argument is not valid.
- open.32.03
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- open.32.04
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- open.32.05
[ENOMEM] [XSR] The path argument names a STREAMS file and the system is unable to allocate resources.
- open.32.06
[ETXTBSY] The file is a pure procedure (shared text) file that is being executed and oflag is O_WRONLY or O_RDWR.
- open.40.01
If a session leader has no controlling terminal, and opens a terminal device file that is not already associated with a session without using the O_NOCTTY option (see open()), it is implementation-defined whether the terminal becomes the controlling terminal of the session leader.
- open.40.02
If a process which is not a session leader opens a terminal file, or the O_NOCTTY option is used on open(), then that terminal shall not become the controlling terminal of the calling process.
- open.40.03
When a controlling terminal becomes associated with a session, its foreground process group shall be set to the process group of the session leader.
- [+]open64 (61 / 0 / 0)
- open64.open.01
The open() function shall establish the connection between a file and a file descriptor. It shall create an open file description that refers to a file and a file descriptor that refers to that open file description.
- open64.open.02.01
The open() function shall return a file descriptor for the named file that is the lowest file descriptor not currently open for that process.
- open64.open.02.02
The open file description is new, and therefore the file descriptor shall not share it with any other process in the system.
- open64.open.02.03
The FD_CLOEXEC file descriptor flag associated with the new file descriptor shall be cleared.
- open64.open.03
The file offset used to mark the current position within the file shall be set to the beginning of the file.
- open64.open.04
The file status flags and file access modes of the open file description shall be set according to the value of oflag.
- open64.open.05
O_APPEND If set, the file offset shall be set to the end of the file prior to each write.
- open64.open.06.01
If the file exists, this flag has no effect except as noted under O_EXCL below.
- open64.open.06.02
Otherwise, the file shall be created;
- open64.open.06.03
the user ID of the file shall be set to the effective user ID of the process;
- open64.open.06.04
the group ID of the file shall be set to the group ID of the file's parent directory or to the effective group ID of the process;
- open64.open.06.05
and the access permission bits (see <sys/stat.h>) of the file mode shall be set to the value of the third argument taken as type mode_t modified as follows: a bitwise AND is performed on the file-mode bits and the corresponding bits in the complement of the process' file mode creation mask. Thus, all bits in the file mode whose corresponding bit in the file mode creation mask is set are cleared.
- open64.open.07
O_DSYNC [SIO] Write I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- open64.open.08.01
If O_CREAT and O_EXCL are set, open() shall fail if the file exists.
- open64.open.08.02
The check for the existence of the file and the creation of the file if it does not exist shall be atomic with respect to other threads executing open() naming the same filename in the same directory with O_EXCL and O_CREAT set.
- open64.open.08.03
If O_EXCL and O_CREAT are set, and path names a symbolic link, open() shall fail and set errno to [EEXIST], regardless of the contents of the symbolic link.
- open64.open.09
O_NOCTTY If set and path identifies a terminal device, open() shall not cause the terminal device to become the controlling terminal for the process.
- open64.open.10.01.01
If O_NONBLOCK is set, an open() for reading-only shall return without delay.
- open64.open.10.01.02
An open() for writing-only shall return an error if no process currently has the file open for reading.
- open64.open.10.02.01
If O_NONBLOCK is clear, an open() for reading-only shall block the calling thread until a thread opens the file for writing.
- open64.open.10.02.02
An open() for writing-only shall block the calling thread until a thread opens the file for reading.
- open64.open.10.03
If O_NONBLOCK is set, the open() function shall return without blocking for the device to be ready or available.
- open64.open.10.04
If O_NONBLOCK is clear, the open() function shall block the calling thread until the device is ready or available before returning.
- open64.open.11.01
Read I/O operations on the file descriptor shall complete at the same level of integrity as specified by the O_DSYNC and O_SYNC flags.
- open64.open.11.02
If both O_DSYNC and O_RSYNC are set in oflag, all I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- open64.open.11.03
If both O_SYNC and O_RSYNC are set in flags, all I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- open64.open.12
O_SYNC [SIO] Write I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- open64.open.13.01
If the file exists and is a regular file, and the file is successfully opened O_RDWR or O_WRONLY, its length shall be truncated to 0, and the mode and owner shall be unchanged.
- open64.open.13.02
It shall have no effect on FIFO special files or terminal device files.
- open64.open.14
If O_CREAT is set and the file did not previously exist, upon successful completion, open() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file and the st_ctime and st_mtime fields of the parent directory.
- open64.open.15
If O_TRUNC is set and the file did previously exist, upon successful completion, open() shall mark for update the st_ctime and st_mtime fields of the file.
- open64.open.16
If both the O_SYNC and O_DSYNC flags are set, the effect is as if only the O_SYNC flag was set.
- open64.open.17
If path refers to a STREAMS file, oflag may be constructed from O_NONBLOCK OR'ed with either O_RDONLY, O_WRONLY, or O_RDWR. Other flag values are not applicable to STREAMS devices and shall have no effect on them.
- open64.open.19
The largest value that can be represented correctly in an object of type off_t shall be established as the offset maximum in the open file description.
- open64.open.30.01
Upon successful completion, the function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor.
- open64.open.30.02
Otherwise, -1 shall be returned and errno set to indicate the error.
- open64.open.30.03
No files shall be created or modified if the function returns -1.
- open64.open.31
The open() function shall fail if:
- open64.open.31.01
[EACCES] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by oflag are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created, or O_TRUNC is specified and write permission is denied.
- open64.open.31.02
[EEXIST] O_CREAT and O_EXCL are set, and the named file exists.
- open64.open.31.03
[EINTR] A signal was caught during open().
- open64.open.31.04
[EINVAL] [SIO] The implementation does not support synchronized I/O for this file.
- open64.open.31.05
[EIO] [XSR] The path argument names a STREAMS file and a hangup or error occurred during the open().
- open64.open.31.06
[EISDIR] The named file is a directory and oflag includes O_WRONLY or O_RDWR.
- open64.open.31.07
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- open64.open.31.08
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- open64.open.31.09
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- open64.open.31.10
[ENFILE] The maximum allowable number of files is currently open in the system.
- open64.open.31.11
[ENOENT] O_CREAT is not set and the named file does not exist; or O_CREAT is set and either the path prefix does not exist or the path argument points to an empty string.
- open64.open.31.12
[ENOSR] [XSR] The path argument names a STREAMS-based file and the system is unable to allocate a STREAM.
- open64.open.31.13
[ENOSPC] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and O_CREAT is specified.
- open64.open.31.14
[ENOTDIR] A component of the path prefix is not a directory.
- open64.open.31.15
[ENXIO] O_NONBLOCK is set, the named file is a FIFO, O_WRONLY is set, and no process has the file open for reading.
- open64.open.31.16
[ENXIO] The named file is a character special or block special file, and the device associated with this special file does not exist.
- open64.open.31.17
[EOVERFLOW] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- open64.open.31.18
[EROFS] The named file resides on a read-only file system and either O_WRONLY, O_RDWR, O_CREAT (if the file does not exist), or O_TRUNC is set in the oflag argument.
- open64.open.32
The open() function may fail if:
- open64.open.32.01
[EAGAIN] [XSI] The path argument names the slave side of a pseudo-terminal device that is locked.
- open64.open.32.02
[EINVAL] The value of the oflag argument is not valid.
- open64.open.32.03
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- open64.open.32.04
[ENAMETOOLONG] As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}.
- open64.open.32.05
[ENOMEM] [XSR] The path argument names a STREAMS file and the system is unable to allocate resources.
- open64.open.32.06
[ETXTBSY] The file is a pure procedure (shared text) file that is being executed and oflag is O_WRONLY or O_RDWR.
- app.open64.open.06.06
When bits other than the file permission bits are set, the effect is unspecified.
- app.open64.open.08.04
If O_EXCL is set and O_CREAT is not set, the result is undefined.
- app.open64.open.10.05
Otherwise, the behavior of O_NONBLOCK is unspecified.
- app.open64.open.104
Values for oflag are constructed by a bitwise-inclusive OR of flags from the following list, defined in <fcntl.h>.>Applications shall specify exactly one of the first three values (file access modes) below in the value of oflag:O_RDONLY Open for reading only. O_WRONLY Open for writing only. O_RDWR Open for reading and writing. The result is undefined if this flag is applied to a FIFO.
- app.open64.open.118
If path names the master side of a pseudo-terminal device, then it is unspecified whether open() locks the slave side so that it cannot be opened.
- app.open64.open.13.03
Its effect on other file types is implementation-defined.
- app.open64.open.13.04
The result of using O_TRUNC with O_RDONLY is undefined.
- app.open64.open.18
Conforming applications shall call unlockpt() before opening the slave side.
- [+]pread (62 / 14 / 0)
- pread.01 (struct)
The read() function shall attempt to read nbyte bytes from the file associated with the open file descriptor, fildes, into the buffer pointed to by buf.
- app.pread.02
The behavior of multiple concurrent reads on the same pipe, FIFO, or terminal device is unspecified.
- pread.03
Before any action described below is taken, and if nbyte is zero, the read() function may detect and return errors as described below.
- pread.04
In the absence of errors, or if error detection is not performed, the read() function shall return zero and have no other results.
- pread.05
On files that support seeking (for example, a regular file), the read() shall start at a position in the file given by the file offset associated with fildes.
- pread.07
Files that do not support seeking-for example, terminals-always read from the current position.
- pread.08
If the starting position is at or after the end-of-file, 0 shall be returned.
- pread.09
When attempting to read from an empty pipe or FIFO:
- pread.09.01
If no process has the pipe open for writing, read() shall return 0 to indicate end-of-file.
- pread.09.02
If some process has the pipe open for writing and O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- pread.09.03
If some process has the pipe open for writing and O_NONBLOCK is clear, read() shall block the calling thread until some data is written or the pipe is closed by all processes that had the pipe open for writing.
- pread.10
When attempting to read a file (other than a pipe or FIFO) that supports non-blocking reads and has no data currently available:
- pread.10.01
If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- pread.10.02 (struct)
If O_NONBLOCK is clear, read() shall block the calling thread until some data becomes available.
- pread.10.03
The use of the O_NONBLOCK flag has no effect if there is some data available.
- pread.11
If any portion of a regular file prior to the end-of-file has not been written, read() shall return bytes with value 0.
- pread.12
If data is later written at this point, subsequent reads in the gap between the previous end of data and the newly written data shall return bytes with value 0 until data is written into the gap.
- pread.13.01
Upon successful completion, where nbyte is greater than 0, read() shall mark for update the st_atime field of the file
- pread.13.02
and shall return the number of bytes read. This number shall never be greater than nbyte.
- pread.14
The value returned may be less than nbyte
- pread.14.01
if the number of bytes left in the file is less than nbyte,
- pread.14.02
if the read() request was interrupted by a signal,
- pread.14.03
or if the file is a pipe or FIFO or special file and has fewer than nbyte bytes immediately available for reading.
- pread.15
If a read() is interrupted by a signal before it reads any data, it shall return -1 with errno set to [EINTR].
- pread.16
If a read() is interrupted by a signal after it has successfully read some data, it shall return the number of bytes read.
- pread.17
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- pread.18
If the O_DSYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- pread.19
If the O_SYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- app.pread.20
If fildes refers to a shared memory object, the result of the read() function is unspecified.
- app.pread.21
If fildes refers to a typed memory object, the result of the read() function is unspecified.
- pread.22
The default shall be byte-stream mode.
- pread.23
In byte-stream mode, read() shall retrieve data from the STREAM until as many bytes as were requested are transferred, or until there is no more data to be retrieved. Byte-stream mode ignores message boundaries.
- pread.24
In STREAMS message-nondiscard mode, read() shall retrieve data until as many bytes as were requested are transferred, or until a message boundary is reached.
- pread.25
If read() does not retrieve all the data in a message, the remaining data shall be left on the STREAM, and can be retrieved by the next read() call.
- pread.26
Message-discard mode also retrieves data until as many bytes as were requested are transferred, or a message boundary is reached.
- pread.27
However, unread data remaining in a message after the read() returns shall be discarded, and shall not be available for a subsequent read(), getmsg(), or getpmsg() call.
- pread.28
In byte-stream mode, read() shall accept data until it has read nbyte bytes, or until there is no more data to read, or until a zero-byte message block is encountered.
- pread.29
The read() function shall then return the number of bytes read, and place the zero-byte message back on the STREAM to be retrieved by the next read(), getmsg(), or getpmsg().
- pread.30
In message-nondiscard mode or message-discard mode, a zero-byte message shall return 0 and the message shall be removed from the STREAM.
- pread.31
When a zero-byte message is read as the first message on a STREAM, the message shall be removed from the STREAM and 0 shall be returned, regardless of the read mode.
- pread.32
A read() from a STREAMS file shall return the data in the message at the front of the STREAM head read queue, regardless of the priority band of the message.
- pread.33
The read() shall fail if a message containing a control part is encountered at the STREAM head.
- pread.34
In control-data mode, read() shall convert any control part to data and pass it to the application before passing any data part originally present in the same message.
- pread.35
In control-discard mode, read() shall discard message control parts but return to the process any data part in the message.
- pread.36
In addition, read() shall fail if the STREAM head had processed an asynchronous error before the call. In this case, the value of errno shall not reflect the result of read(), but reflect the prior error.
- pread.37.01
If a hangup occurs on the STREAM being read, read() shall continue to operate normally until the STREAM head read queue is empty.
- pread.37.02
Thereafter, it shall return 0.
- pread.38
The pread() function shall be equivalent to read(), except that it shall read from a given position in the file without changing the file pointer.
- pread.39
The first three arguments to pread() are the same as read() with the addition of a fourth argument offset for the desired position inside the file.
- pread.40
An attempt to perform a pread() on a file that is incapable of seeking shall result in an error.
- pread.41.01
Upon successful completion, read() [XSI] and pread() shall return a non-negative integer indicating the number of bytes actually read.
- pread.41.02
Otherwise, the functions shall return -1 and set errno to indicate the error.
- pread.42
The read() and [XSI] pread() functions shall fail if:
- pread.42.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed.
- pread.42.02
[EBADF] The fildes argument is not a valid file descriptor open for reading.
- pread.42.03
[EBADMSG] [XSR] The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
- pread.42.04
[EINTR] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- pread.42.05
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- pread.42.06
[EIO] The process is a member of a background process attempting to read from its controlling terminal, the process is ignoring or blocking the SIGTTIN signal, or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- pread.42.07
[EISDIR] [XSI] The fildes argument refers to a directory and the implementation does not allow the directory to be read using read() or pread(). The readdir() function should be used instead.
- pread.42.08
[EOVERFLOW] The file is a regular file, nbyte is greater than 0, the starting position is before the end-of-file, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- pread.44
The read() and [XSI] pread() functions may fail if:
- pread.44.01
[EIO] A physical I/O error has occurred.
- pread.44.02
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- pread.44.03
[ENOMEM] Insufficient memory was available to fulfill the request.
- pread.44.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- pread.45
The pread() function shall fail, and the file pointer shall remain unchanged, if:
- pread.45.01
[EINVAL] [XSI] The offset argument is invalid. The value is negative.
- pread.45.02
[EOVERFLOW] [XSI] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the file.
- pread.45.03
[ENXIO] [XSI] A request was outside the capabilities of the device.
- pread.45.04
[ESPIPE] [XSI] fildes is associated with a pipe or FIFO.
- pread.50
If the file refers to a device special file, the result of subsequent read() requests is implementation-defined.
- app.pread.51
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- pread.52
The read() function reads data previously written to a file.
- [+]pread64 (62 / 0 / 0)
- pread64.pread.01 (struct)
The read() function shall attempt to read nbyte bytes from the file associated with the open file descriptor, fildes, into the buffer pointed to by buf.
- pread64.pread.03
Before any action described below is taken, and if nbyte is zero, the read() function may detect and return errors as described below.
- pread64.pread.04
In the absence of errors, or if error detection is not performed, the read() function shall return zero and have no other results.
- pread64.pread.05
On files that support seeking (for example, a regular file), the read() shall start at a position in the file given by the file offset associated with fildes.
- pread64.pread.07
Files that do not support seeking-for example, terminals-always read from the current position.
- pread64.pread.08
If the starting position is at or after the end-of-file, 0 shall be returned.
- pread64.pread.09
When attempting to read from an empty pipe or FIFO:
- pread64.pread.09.01
If no process has the pipe open for writing, read() shall return 0 to indicate end-of-file.
- pread64.pread.09.02
If some process has the pipe open for writing and O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- pread64.pread.09.03
If some process has the pipe open for writing and O_NONBLOCK is clear, read() shall block the calling thread until some data is written or the pipe is closed by all processes that had the pipe open for writing.
- pread64.pread.10
When attempting to read a file (other than a pipe or FIFO) that supports non-blocking reads and has no data currently available:
- pread64.pread.10.01
If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- pread64.pread.10.02 (struct)
If O_NONBLOCK is clear, read() shall block the calling thread until some data becomes available.
- pread64.pread.10.03
The use of the O_NONBLOCK flag has no effect if there is some data available.
- pread64.pread.11
If any portion of a regular file prior to the end-of-file has not been written, read() shall return bytes with value 0.
- pread64.pread.12
If data is later written at this point, subsequent reads in the gap between the previous end of data and the newly written data shall return bytes with value 0 until data is written into the gap.
- pread64.pread.13.01
Upon successful completion, where nbyte is greater than 0, read() shall mark for update the st_atime field of the file
- pread64.pread.13.02
and shall return the number of bytes read. This number shall never be greater than nbyte.
- pread64.pread.14
The value returned may be less than nbyte
- pread64.pread.14.01
if the number of bytes left in the file is less than nbyte,
- pread64.pread.14.02
if the read() request was interrupted by a signal,
- pread64.pread.14.03
or if the file is a pipe or FIFO or special file and has fewer than nbyte bytes immediately available for reading.
- pread64.pread.15
If a read() is interrupted by a signal before it reads any data, it shall return -1 with errno set to [EINTR].
- pread64.pread.16
If a read() is interrupted by a signal after it has successfully read some data, it shall return the number of bytes read.
- pread64.pread.17
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- pread64.pread.18
If the O_DSYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- pread64.pread.19
If the O_SYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- pread64.pread.22
The default shall be byte-stream mode.
- pread64.pread.23
In byte-stream mode, read() shall retrieve data from the STREAM until as many bytes as were requested are transferred, or until there is no more data to be retrieved. Byte-stream mode ignores message boundaries.
- pread64.pread.24
In STREAMS message-nondiscard mode, read() shall retrieve data until as many bytes as were requested are transferred, or until a message boundary is reached.
- pread64.pread.25
If read() does not retrieve all the data in a message, the remaining data shall be left on the STREAM, and can be retrieved by the next read() call.
- pread64.pread.26
Message-discard mode also retrieves data until as many bytes as were requested are transferred, or a message boundary is reached.
- pread64.pread.27
However, unread data remaining in a message after the read() returns shall be discarded, and shall not be available for a subsequent read(), getmsg(), or getpmsg() call.
- pread64.pread.28
In byte-stream mode, read() shall accept data until it has read nbyte bytes, or until there is no more data to read, or until a zero-byte message block is encountered.
- pread64.pread.29
The read() function shall then return the number of bytes read, and place the zero-byte message back on the STREAM to be retrieved by the next read(), getmsg(), or getpmsg().
- pread64.pread.30
In message-nondiscard mode or message-discard mode, a zero-byte message shall return 0 and the message shall be removed from the STREAM.
- pread64.pread.31
When a zero-byte message is read as the first message on a STREAM, the message shall be removed from the STREAM and 0 shall be returned, regardless of the read mode.
- pread64.pread.32
A read() from a STREAMS file shall return the data in the message at the front of the STREAM head read queue, regardless of the priority band of the message.
- pread64.pread.33
The read() shall fail if a message containing a control part is encountered at the STREAM head.
- pread64.pread.34
In control-data mode, read() shall convert any control part to data and pass it to the application before passing any data part originally present in the same message.
- pread64.pread.35
In control-discard mode, read() shall discard message control parts but return to the process any data part in the message.
- pread64.pread.36
In addition, read() shall fail if the STREAM head had processed an asynchronous error before the call. In this case, the value of errno shall not reflect the result of read(), but reflect the prior error.
- pread64.pread.37.01
If a hangup occurs on the STREAM being read, read() shall continue to operate normally until the STREAM head read queue is empty.
- pread64.pread.37.02
Thereafter, it shall return 0.
- pread64.pread.38
The pread() function shall be equivalent to read(), except that it shall read from a given position in the file without changing the file pointer.
- pread64.pread.39
The first three arguments to pread() are the same as read() with the addition of a fourth argument offset for the desired position inside the file.
- pread64.pread.40
An attempt to perform a pread() on a file that is incapable of seeking shall result in an error.
- pread64.pread.41.01
Upon successful completion, read() [XSI] and pread() shall return a non-negative integer indicating the number of bytes actually read.
- pread64.pread.41.02
Otherwise, the functions shall return -1 and set errno to indicate the error.
- pread64.pread.42
The read() and [XSI] pread() functions shall fail if:
- pread64.pread.42.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed.
- pread64.pread.42.02
[EBADF] The fildes argument is not a valid file descriptor open for reading.
- pread64.pread.42.03
[EBADMSG] [XSR] The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
- pread64.pread.42.04
[EINTR] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- pread64.pread.42.05
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- pread64.pread.42.06
[EIO] The process is a member of a background process attempting to read from its controlling terminal, the process is ignoring or blocking the SIGTTIN signal, or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- pread64.pread.42.07
[EISDIR] [XSI] The fildes argument refers to a directory and the implementation does not allow the directory to be read using read() or pread(). The readdir() function should be used instead.
- pread64.pread.42.08
[EOVERFLOW] The file is a regular file, nbyte is greater than 0, the starting position is before the end-of-file, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- pread64.pread.44
The read() and [XSI] pread() functions may fail if:
- pread64.pread.44.01
[EIO] A physical I/O error has occurred.
- pread64.pread.44.02
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- pread64.pread.44.03
[ENOMEM] Insufficient memory was available to fulfill the request.
- pread64.pread.44.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- pread64.pread.45
The pread() function shall fail, and the file pointer shall remain unchanged, if:
- pread64.pread.45.01
[EINVAL] [XSI] The offset argument is invalid. The value is negative.
- pread64.pread.45.02
[EOVERFLOW] [XSI] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the file.
- pread64.pread.45.03
[ENXIO] [XSI] A request was outside the capabilities of the device.
- pread64.pread.45.04
[ESPIPE] [XSI] fildes is associated with a pipe or FIFO.
- pread64.pread.50
If the file refers to a device special file, the result of subsequent read() requests is implementation-defined.
- pread64.pread.52
The read() function reads data previously written to a file.
- app.pread64.pread.02
The behavior of multiple concurrent reads on the same pipe, FIFO, or terminal device is unspecified.
- app.pread64.pread.20
If fildes refers to a shared memory object, the result of the read() function is unspecified.
- app.pread64.pread.21
If fildes refers to a typed memory object, the result of the read() function is unspecified.
- app.pread64.pread.51
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- [+]pwrite (62 / 16 / 0)
- pwrite.02.01
Before any action described below is taken, and if nbyte is zero and the file is a regular file, the write() function may detect and return errors as described below.
- pwrite.02.02
In the absence of errors, or if error detection is not performed, the write() function shall return zero and have no other results.
- app.pwrite.03
If nbyte is zero and the file is not a regular file, the results are unspecified.
- pwrite.06
On a regular file, if this incremented file offset is greater than the length of the file, the length of the file shall be set to this file offset.
- pwrite.07
On a file not capable of seeking, writing shall always take place starting at the current position.
- pwrite.08.01
If the O_APPEND flag of the file status flags is set, the file offset shall be set to the end of the file prior to each write
- pwrite.08.02
no intervening file modification operation shall occur between changing the file offset and the write operation.
- pwrite.09
If a write() requests that more bytes be written than there is room for (for example, [XSI] the process' file size limit or the physical end of a medium), only as many bytes as there is room for shall be written.
- pwrite.10
If the request would cause the file size to exceed the soft file size limit for the process and there is no room for any bytes to be written, the request shall fail and the implementation shall generate the SIGXFSZ signal for the thread.
- pwrite.11
If write() is interrupted by a signal before it writes any data, it shall return -1 with errno set to [EINTR].
- pwrite.12
If write() is interrupted by a signal after it successfully writes some data, it shall return the number of bytes written.
- app.pwrite.13
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- pwrite.14
Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified.
- pwrite.15
Any subsequent successful write() to the same byte position in the file shall overwrite that file data.
- pwrite.16
There is no file offset associated with a pipe, hence each write request shall append to the end of the pipe.
- pwrite.17.01
Write requests of {PIPE_BUF} bytes or less shall not be interleaved with data from other processes doing writes on the same pipe.
- pwrite.17.02
Writes of greater than {PIPE_BUF} bytes may have data interleaved, on arbitrary boundaries, with writes by other processes, whether or not the O_NONBLOCK flag of the file status flags is set.
- pwrite.18
If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte.
- pwrite.19
If the O_NONBLOCK flag is set, write() requests shall be handled differently, in the following ways:
- pwrite.19.01
The write() function shall not block the thread.
- pwrite.19.02.01
A write request for {PIPE_BUF} or fewer bytes shall have the following effect: if there is sufficient space available in the pipe, write() shall transfer all the data and return the number of bytes requested.
- pwrite.19.02.02
Otherwise, write() shall transfer no data and return -1 with errno set to [EAGAIN].
- pwrite.19.03
A write request for more than {PIPE_BUF} bytes shall cause one of the following:
- pwrite.19.03.01
When at least one byte can be written, transfer what it can and return the number of bytes written. When all data previously written to the pipe is read, it shall transfer at least {PIPE_BUF} bytes.
- pwrite.19.03.02
When no data can be written, transfer no data, and return -1 with errno set to [EAGAIN].
- pwrite.20
When attempting to write to a file descriptor (other than a pipe or FIFO) that supports non-blocking writes and cannot accept the data immediately:
- pwrite.20.01 (struct)
If the O_NONBLOCK flag is clear, write() shall block the calling thread until the data can be accepted.
- pwrite.20.02.01
If the O_NONBLOCK flag is set, write() shall not block the thread.
- pwrite.20.02.02
If some data can be written without blocking the thread, write() shall write what it can and return the number of bytes written.
- pwrite.20.02.03
Otherwise, it shall return -1 and set errno to [EAGAIN].
- pwrite.22.01
Upon successful completion, where nbyte is greater than 0, write() shall mark for update the st_ctime and st_mtime fields of the file,
- pwrite.22.02
if the file is a regular file, the S_ISUID and S_ISGID bits of the file mode may be cleared.
- pwrite.23
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- pwrite.24
If the O_DSYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion
- pwrite.25
If the O_SYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- app.pwrite.26
If fildes refers to a shared memory object, the result of the write() function is unspecified.
- app.pwrite.27
If fildes refers to a typed memory object, the result of the write() function is unspecified.
- pwrite.28
If fildes refers to a STREAM, the operation of write() shall be determined by the values of the minimum and maximum nbyte range (packet size) accepted by the STREAM.
- pwrite.29
If nbyte falls within the packet size range, nbyte bytes shall be written.
- pwrite.30
If nbyte does not fall within the range and the minimum packet size value is 0, write() shall break the buffer into maximum packet size segments prior to sending the data downstream (the last segment may contain less than the maximum packet size).
- pwrite.31
If nbyte does not fall within the range and the minimum value is non-zero, write() shall fail with errno set to [ERANGE].
- pwrite.32
Writing a zero-length buffer ( nbyte is 0) to a STREAMS device sends 0 bytes with 0 returned
- pwrite.33
However, writing a zero-length buffer to a STREAMS-based pipe or FIFO sends no message and 0 is returned.
- pwrite.34
When writing to a STREAM, data messages are created with a priority band of 0.
- pwrite.35
When writing to a STREAM that is not a pipe or FIFO:
- pwrite.35.01
If O_NONBLOCK is clear, and the STREAM cannot accept data (the STREAM write queue is full due to internal flow control conditions), write() shall block until data can be accepted.
- pwrite.35.02
If O_NONBLOCK is set and the STREAM cannot accept data, write() shall return -1 and set errno to [EAGAIN].
- pwrite.35.03
If O_NONBLOCK is set and part of the buffer has been written while a condition in which the STREAM cannot accept additional data occurs, write() shall terminate and return the number of bytes written.
- pwrite.36.01
In addition, write() shall fail if the STREAM head has processed an asynchronous error before the call.
- pwrite.36.02
In this case, the value of errno does not reflect the result of write(), but reflects the prior error.
- pwrite.37
The pwrite() function shall be equivalent to write(), except that it writes into a given position without changing the file pointer.
- pwrite.38
The first three arguments to pwrite() are the same as write() with the addition of a fourth argument offset for the desired position inside the file.
- pwrite.40.01 (struct)
Upon successful completion, write() [XSI] and pwrite() shall return the number of bytes actually written to the file associated with fildes.
- pwrite.40.02
This number shall never be greater than nbyte.
- pwrite.40.03
Otherwise, -1 shall be returned and errno set to indicate the error.
- pwrite.41
The write() and [XSI] pwrite() functions shall fail if:
- pwrite.41.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write() operation.
- pwrite.41.02
[EBADF] The fildes argument is not a valid file descriptor open for writing.
- pwrite.41.03
[EFBIG] An attempt was made to write a file that exceeds the implementation-defined maximum file size [XSI] or the process' file size limit, and there was no room for any bytes to be written.
- pwrite.41.04
[EFBIG] The file is a regular file, nbyte is greater than 0, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- pwrite.41.05
[EINTR] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- pwrite.41.06
[EIO] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- pwrite.41.07
[ENOSPC] There was no free space remaining on the device containing the file.
- pwrite.41.08
[EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process, or that only has one end open. A SIGPIPE signal shall also be sent to the thread.
- pwrite.41.09
[ERANGE] [XSR] The transfer request size was outside the range supported by the STREAMS file associated with fildes.
- pwrite.43
The write() and [XSI] pwrite() functions may fail if:
- pwrite.43.01
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- pwrite.43.02
[EIO] A physical I/O error has occurred.
- pwrite.43.03
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- pwrite.43.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- pwrite.43.05
[ENXIO] [XSR] A hangup occurred on the STREAM being written to.
- pwrite.45
The pwrite() function shall fail and the file pointer remain unchanged if:
- pwrite.45.01
[EINVAL] [XSI] The offset argument is invalid. The value is negative.
- pwrite.45.02
[ESPIPE] [XSI] fildes is associated with a pipe or FIFO.
- pwrite.46
A write to a STREAMS file may fail if an error message has been received at the STREAM head. In this case, errno is set to the value included in the error message.
- [+]pwrite64 (62 / 8 / 0)
- pwrite64.pwrite.02.01
Before any action described below is taken, and if nbyte is zero and the file is a regular file, the write() function may detect and return errors as described below.
- pwrite64.pwrite.02.02
In the absence of errors, or if error detection is not performed, the write() function shall return zero and have no other results.
- pwrite64.pwrite.06
On a regular file, if this incremented file offset is greater than the length of the file, the length of the file shall be set to this file offset.
- pwrite64.pwrite.07
On a file not capable of seeking, writing shall always take place starting at the current position.
- pwrite64.pwrite.08.01
If the O_APPEND flag of the file status flags is set, the file offset shall be set to the end of the file prior to each write
- pwrite64.pwrite.08.02
no intervening file modification operation shall occur between changing the file offset and the write operation.
- pwrite64.pwrite.09
If a write() requests that more bytes be written than there is room for (for example, [XSI] the process' file size limit or the physical end of a medium), only as many bytes as there is room for shall be written.
- pwrite64.pwrite.10
If the request would cause the file size to exceed the soft file size limit for the process and there is no room for any bytes to be written, the request shall fail and the implementation shall generate the SIGXFSZ signal for the thread.
- pwrite64.pwrite.11
If write() is interrupted by a signal before it writes any data, it shall return -1 with errno set to [EINTR].
- pwrite64.pwrite.12
If write() is interrupted by a signal after it successfully writes some data, it shall return the number of bytes written.
- pwrite64.pwrite.14
Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified.
- pwrite64.pwrite.15
Any subsequent successful write() to the same byte position in the file shall overwrite that file data.
- pwrite64.pwrite.16
There is no file offset associated with a pipe, hence each write request shall append to the end of the pipe.
- pwrite64.pwrite.17.01
Write requests of {PIPE_BUF} bytes or less shall not be interleaved with data from other processes doing writes on the same pipe.
- pwrite64.pwrite.17.02
Writes of greater than {PIPE_BUF} bytes may have data interleaved, on arbitrary boundaries, with writes by other processes, whether or not the O_NONBLOCK flag of the file status flags is set.
- pwrite64.pwrite.18
If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte.
- pwrite64.pwrite.19
If the O_NONBLOCK flag is set, write() requests shall be handled differently, in the following ways:
- pwrite64.pwrite.19.01
The write() function shall not block the thread.
- pwrite64.pwrite.19.02.01
A write request for {PIPE_BUF} or fewer bytes shall have the following effect: if there is sufficient space available in the pipe, write() shall transfer all the data and return the number of bytes requested.
- pwrite64.pwrite.19.02.02
Otherwise, write() shall transfer no data and return -1 with errno set to [EAGAIN].
- pwrite64.pwrite.19.03
A write request for more than {PIPE_BUF} bytes shall cause one of the following:
- pwrite64.pwrite.19.03.01
When at least one byte can be written, transfer what it can and return the number of bytes written. When all data previously written to the pipe is read, it shall transfer at least {PIPE_BUF} bytes.
- pwrite64.pwrite.19.03.02
When no data can be written, transfer no data, and return -1 with errno set to [EAGAIN].
- pwrite64.pwrite.20
When attempting to write to a file descriptor (other than a pipe or FIFO) that supports non-blocking writes and cannot accept the data immediately:
- pwrite64.pwrite.20.01 (struct)
If the O_NONBLOCK flag is clear, write() shall block the calling thread until the data can be accepted.
- pwrite64.pwrite.20.02.01
If the O_NONBLOCK flag is set, write() shall not block the thread.
- pwrite64.pwrite.20.02.02
If some data can be written without blocking the thread, write() shall write what it can and return the number of bytes written.
- pwrite64.pwrite.20.02.03
Otherwise, it shall return -1 and set errno to [EAGAIN].
- pwrite64.pwrite.22.01
Upon successful completion, where nbyte is greater than 0, write() shall mark for update the st_ctime and st_mtime fields of the file,
- pwrite64.pwrite.22.02
if the file is a regular file, the S_ISUID and S_ISGID bits of the file mode may be cleared.
- pwrite64.pwrite.23
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- pwrite64.pwrite.24
If the O_DSYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion
- pwrite64.pwrite.25
If the O_SYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- pwrite64.pwrite.28
If fildes refers to a STREAM, the operation of write() shall be determined by the values of the minimum and maximum nbyte range (packet size) accepted by the STREAM.
- pwrite64.pwrite.29
If nbyte falls within the packet size range, nbyte bytes shall be written.
- pwrite64.pwrite.30
If nbyte does not fall within the range and the minimum packet size value is 0, write() shall break the buffer into maximum packet size segments prior to sending the data downstream (the last segment may contain less than the maximum packet size).
- pwrite64.pwrite.31
If nbyte does not fall within the range and the minimum value is non-zero, write() shall fail with errno set to [ERANGE].
- pwrite64.pwrite.32
Writing a zero-length buffer ( nbyte is 0) to a STREAMS device sends 0 bytes with 0 returned
- pwrite64.pwrite.33
However, writing a zero-length buffer to a STREAMS-based pipe or FIFO sends no message and 0 is returned.
- pwrite64.pwrite.34
When writing to a STREAM, data messages are created with a priority band of 0.
- pwrite64.pwrite.35
When writing to a STREAM that is not a pipe or FIFO:
- pwrite64.pwrite.35.01
If O_NONBLOCK is clear, and the STREAM cannot accept data (the STREAM write queue is full due to internal flow control conditions), write() shall block until data can be accepted.
- pwrite64.pwrite.35.02
If O_NONBLOCK is set and the STREAM cannot accept data, write() shall return -1 and set errno to [EAGAIN].
- pwrite64.pwrite.35.03
If O_NONBLOCK is set and part of the buffer has been written while a condition in which the STREAM cannot accept additional data occurs, write() shall terminate and return the number of bytes written.
- pwrite64.pwrite.36.01
In addition, write() shall fail if the STREAM head has processed an asynchronous error before the call.
- pwrite64.pwrite.36.02
In this case, the value of errno does not reflect the result of write(), but reflects the prior error.
- pwrite64.pwrite.37
The pwrite() function shall be equivalent to write(), except that it writes into a given position without changing the file pointer.
- pwrite64.pwrite.38
The first three arguments to pwrite() are the same as write() with the addition of a fourth argument offset for the desired position inside the file.
- pwrite64.pwrite.40.01 (struct)
Upon successful completion, write() [XSI] and pwrite() shall return the number of bytes actually written to the file associated with fildes.
- pwrite64.pwrite.40.02
This number shall never be greater than nbyte.
- pwrite64.pwrite.40.03
Otherwise, -1 shall be returned and errno set to indicate the error.
- pwrite64.pwrite.41
The write() and [XSI] pwrite() functions shall fail if:
- pwrite64.pwrite.41.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write() operation.
- pwrite64.pwrite.41.02
[EBADF] The fildes argument is not a valid file descriptor open for writing.
- pwrite64.pwrite.41.03
[EFBIG] An attempt was made to write a file that exceeds the implementation-defined maximum file size [XSI] or the process' file size limit, and there was no room for any bytes to be written.
- pwrite64.pwrite.41.04
[EFBIG] The file is a regular file, nbyte is greater than 0, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- pwrite64.pwrite.41.05
[EINTR] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- pwrite64.pwrite.41.06
[EIO] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- pwrite64.pwrite.41.07
[ENOSPC] There was no free space remaining on the device containing the file.
- pwrite64.pwrite.41.08
[EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process, or that only has one end open. A SIGPIPE signal shall also be sent to the thread.
- pwrite64.pwrite.41.09
[ERANGE] [XSR] The transfer request size was outside the range supported by the STREAMS file associated with fildes.
- pwrite64.pwrite.43
The write() and [XSI] pwrite() functions may fail if:
- pwrite64.pwrite.43.01
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- pwrite64.pwrite.43.02
[EIO] A physical I/O error has occurred.
- pwrite64.pwrite.43.03
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- pwrite64.pwrite.43.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- pwrite64.pwrite.43.05
[ENXIO] [XSR] A hangup occurred on the STREAM being written to.
- pwrite64.pwrite.45
The pwrite() function shall fail and the file pointer remain unchanged if:
- pwrite64.pwrite.45.01
[EINVAL] [XSI] The offset argument is invalid. The value is negative.
- pwrite64.pwrite.45.02
[ESPIPE] [XSI] fildes is associated with a pipe or FIFO.
- pwrite64.pwrite.46
A write to a STREAMS file may fail if an error message has been received at the STREAM head. In this case, errno is set to the value included in the error message.
- app.pwrite64.pwrite.03
If nbyte is zero and the file is not a regular file, the results are unspecified.
- app.pwrite64.pwrite.13
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- app.pwrite64.pwrite.26
If fildes refers to a shared memory object, the result of the write() function is unspecified.
- app.pwrite64.pwrite.27
If fildes refers to a typed memory object, the result of the write() function is unspecified.
- [+]read (109 / 30 / 0)
- read.01 (struct)
The read() function shall attempt to read nbyte bytes from the file associated with the open file descriptor, fildes, into the buffer pointed to by buf.
- app.read.02
The behavior of multiple concurrent reads on the same pipe, FIFO, or terminal device is unspecified.
- read.03
Before any action described below is taken, and if nbyte is zero, the read() function may detect and return errors as described below.
- read.04
In the absence of errors, or if error detection is not performed, the read() function shall return zero and have no other results.
- read.05
On files that support seeking (for example, a regular file), the read() shall start at a position in the file given by the file offset associated with fildes.
- read.06
The file offset shall be incremented by the number of bytes actually read.
- read.07
Files that do not support seeking-for example, terminals-always read from the current position.
- read.08
If the starting position is at or after the end-of-file, 0 shall be returned.
- read.09
When attempting to read from an empty pipe or FIFO:
- read.09.01
If no process has the pipe open for writing, read() shall return 0 to indicate end-of-file.
- read.09.02
If some process has the pipe open for writing and O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- read.09.03
If some process has the pipe open for writing and O_NONBLOCK is clear, read() shall block the calling thread until some data is written or the pipe is closed by all processes that had the pipe open for writing.
- app.read.10
If IEXTEN is set, implementation-defined functions shall be recognized from the input data. It is implementation-defined how IEXTEN being set interacts with ICANON, ISIG, IXON, or IXOFF. If IEXTEN is not set, implementation-defined functions shall not be recognized and the corresponding input characters are processed as described for ICANON, ISIG, IXON, and IXOFF.
A special character is recognized not only by its value, but also by its context; for example, an implementation may support multi-byte sequences that have a meaning different from the meaning of the bytes when considered individually. Implementations may also support additional single-byte functions. These implementation-defined multi-byte or single-byte functions shall be recognized only if the IEXTEN flag is set; otherwise, data is received without interpretation, except as required to recognize the special characters defined in this section.
- read.10
When attempting to read a file (other than a pipe or FIFO) that supports non-blocking reads and has no data currently available:
- read.10.01
If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- read.10.02 (struct)
If O_NONBLOCK is clear, read() shall block the calling thread until some data becomes available.
- read.10.03
The use of the O_NONBLOCK flag has no effect if there is some data available.
- app.read.11
If {MAX_CANON} is defined for this terminal device, it shall be a limit on the number of bytes in a line. The behavior of the system when this limit is exceeded is implementation-defined. If {MAX_CANON} is not defined, there shall be no such limit;
- read.11
If any portion of a regular file prior to the end-of-file has not been written, read() shall return bytes with value 0.
- read.12
If data is later written at this point, subsequent reads in the gap between the previous end of data and the newly written data shall return bytes with value 0 until data is written into the gap.
- app.read.12
If two or more special characters have the same value, the function performed when that character is received is undefined.
- read.13.01
Upon successful completion, where nbyte is greater than 0, read() shall mark for update the st_atime field of the file
- read.13.02
and shall return the number of bytes read. This number shall never be greater than nbyte.
- app.read.13
If MIN is greater than {MAX_INPUT}, the response to the request is undefined.
- read.14
The value returned may be less than nbyte
- read.14.01
if the number of bytes left in the file is less than nbyte,
- read.14.02
if the read() request was interrupted by a signal,
- read.14.03
or if the file is a pipe or FIFO or special file and has fewer than nbyte bytes immediately available for reading.
- app.read.14
The system may impose a limit, {MAX_INPUT}, on the number of bytes that may be stored in the input queue. The behavior of the system when this limit is exceeded is implementation-defined.
- read.15
If a read() is interrupted by a signal before it reads any data, it shall return -1 with errno set to [EINTR].
- read.16
If a read() is interrupted by a signal after it has successfully read some data, it shall return the number of bytes read.
- read.17
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- read.18
If the O_DSYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- read.19
If the O_SYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- app.read.20
If fildes refers to a shared memory object, the result of the read() function is unspecified.
- app.read.21
If fildes refers to a typed memory object, the result of the read() function is unspecified.
- read.22
The default shall be byte-stream mode.
- read.23
In byte-stream mode, read() shall retrieve data from the STREAM until as many bytes as were requested are transferred, or until there is no more data to be retrieved. Byte-stream mode ignores message boundaries.
- read.24
In STREAMS message-nondiscard mode, read() shall retrieve data until as many bytes as were requested are transferred, or until a message boundary is reached.
- read.25
If read() does not retrieve all the data in a message, the remaining data shall be left on the STREAM, and can be retrieved by the next read() call.
- read.26
Message-discard mode also retrieves data until as many bytes as were requested are transferred, or a message boundary is reached.
- read.27
However, unread data remaining in a message after the read() returns shall be discarded, and shall not be available for a subsequent read(), getmsg(), or getpmsg() call.
- read.28
In byte-stream mode, read() shall accept data until it has read nbyte bytes, or until there is no more data to read, or until a zero-byte message block is encountered.
- read.29
The read() function shall then return the number of bytes read, and place the zero-byte message back on the STREAM to be retrieved by the next read(), getmsg(), or getpmsg().
- read.30
In message-nondiscard mode or message-discard mode, a zero-byte message shall return 0 and the message shall be removed from the STREAM.
- read.31
When a zero-byte message is read as the first message on a STREAM, the message shall be removed from the STREAM and 0 shall be returned, regardless of the read mode.
- read.31.01.01
Also, if no data is available, read() may either return 0, or return -1 with errno set to [EAGAIN].
- read.32
A read() from a STREAMS file shall return the data in the message at the front of the STREAM head read queue, regardless of the priority band of the message.
- read.33
The read() shall fail if a message containing a control part is encountered at the STREAM head.
- read.34
In control-data mode, read() shall convert any control part to data and pass it to the application before passing any data part originally present in the same message.
- read.35
In control-discard mode, read() shall discard message control parts but return to the process any data part in the message.
- read.36
In addition, read() shall fail if the STREAM head had processed an asynchronous error before the call. In this case, the value of errno shall not reflect the result of read(), but reflect the prior error.
- read.37.01
If a hangup occurs on the STREAM being read, read() shall continue to operate normally until the STREAM head read queue is empty.
- read.37.02
Thereafter, it shall return 0.
- read.41.01
Upon successful completion, read() [XSI] and pread() shall return a non-negative integer indicating the number of bytes actually read.
- read.41.02
Otherwise, the functions shall return -1 and set errno to indicate the error.
- read.42
The read() and [XSI] pread() functions shall fail if:
- read.42.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed.
- read.42.02
[EBADF] The fildes argument is not a valid file descriptor open for reading.
- read.42.03
[EBADMSG] [XSR] The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
- read.42.04
[EINTR] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- read.42.05
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- read.42.06
[EIO] The process is a member of a background process attempting to read from its controlling terminal, the process is ignoring or blocking the SIGTTIN signal, or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- read.42.07
[EISDIR] [XSI] The fildes argument refers to a directory and the implementation does not allow the directory to be read using read() or pread(). The readdir() function should be used instead.
- read.42.08
[EOVERFLOW] The file is a regular file, nbyte is greater than 0, the starting position is before the end-of-file, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- read.43
The read() function shall fail if:
- read.43.01
[EAGAIN] or [EWOULDBLOCK] The file descriptor is for a socket, is marked O_NONBLOCK, and no data is waiting to be received.
- read.43.02
[ECONNRESET] A read was attempted on a socket and the connection was forcibly closed by its peer.
- read.43.03
[ENOTCONN] A read was attempted on a socket that is not connected.
- read.43.04
[ETIMEDOUT] A read was attempted on a socket and a transmission timeout occurred.
- read.44
The read() and [XSI] pread() functions may fail if:
- read.44.01
[EIO] A physical I/O error has occurred.
- read.44.02
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- read.44.03
[ENOMEM] Insufficient memory was available to fulfill the request.
- read.44.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- read.50
If the file refers to a device special file, the result of subsequent read() requests is implementation-defined.
- app.read.51
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- read.52
The read() function reads data previously written to a file.
- read.55
Any subsequent read from the terminal device shall return the value of zero, indicating end-of-file; see read().
- read.60.01
If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore not read by any process.
- read.60.02.01
If IGNBRK is not set and BRKINT is set, the break condition shall flush the input and output queues,
- read.60.02.02
and if the terminal is the controlling terminal of a foreground process group, the break condition shall generate a single SIGINT signal to that foreground process group.
- read.60.03
If neither IGNBRK nor BRKINT is set, a break condition shall be read as a single 0x00, or if PARMRK is set, as 0xff 0x00 0x00.
- read.61.01
Special character on input, which is recognized if the ISIG flag is set. Generates a SIGINT signal which is sent to all processes in the foreground process group for which the terminal is the controlling terminal.
- read.61.02
If ISIG is set, the INTR character shall be discarded when processed.
- read.62.01
Special character on input, which is recognized if the ISIG flag is set. Generates a SIGQUIT signal which is sent to all processes in the foreground process group for which the terminal is the controlling terminal.
- read.62.02
If ISIG is set, the QUIT character shall be discarded when processed.
- read.63.01
If the ISIG flag is set, receipt of the SUSP character shall cause a SIGTSTP signal to be sent to all processes in the foreground process group for which the terminal is the controlling terminal,
- read.63.02
and the SUSP character shall be discarded when processed.
- read.64.01
Special character on both input and output, which is recognized if the IXON (output control) or IXOFF (input control) flag is set. Can be used to suspend output temporarily. It is useful with CRT terminals to prevent output from disappearing before it can be read.
If IXON is set, start/stop output control shall be enabled. A received STOP character shall suspend output
- read.64.02
When IXON is not set, the START and STOP characters shall be read.
If IXON is set, the STOP character shall be discarded when processed.
When IXON is set, START and STOP characters are not read, but merely perform flow control functions.
- read.65.01
and a received START character shall restart output.
Special character on both input and output, which is recognized if the IXON (output control) or IXOFF (input control) flag is set. Can be used to resume output that has been suspended by a STOP character.
- read.65.02
When IXON is not set, the START and STOP characters shall be read.
If IXON is set, the START character shall be discarded when processed.
When IXON is set, START and STOP characters are not read, but merely perform flow control functions.
- read.66.01
Special character on input, which is recognized if the ICANON flag is set. Erases the last character in the current line; see Canonical Mode Input Processing. It shall not erase beyond the start of a line, as delimited by an NL, EOF, or EOL character.
The ERASE character shall delete the last character in the current line, if there is one.
The ERASE and KILL characters shall have no effect if there is no data in the current line.
- read.66.02
If ICANON is set, the ERASE character shall be discarded when processed.
The ERASE and KILL characters themselves shall not be placed in the input queue.
- read.67.01
Special character on input, which is recognized if the ICANON flag is set. Deletes the entire line, as delimited by an NL, EOF, or EOL character.
The KILL character shall delete all data in the current line, if there is any.
The ERASE and KILL characters shall have no effect if there is no data in the current line.
- read.67.02
The ERASE and KILL characters themselves shall not be placed in the input queue.
If ICANON is set, the KILL character shall be discarded when processed.
- read.68.01
Special character on input, which is recognized if the ICANON flag is set. When received, all the bytes waiting to be read are immediately passed to the process without waiting for a newline, and the EOF is discarded. Thus, if there are no bytes waiting (that is, the EOF occurred at the beginning of a line), a byte count of zero shall be returned from the read(), representing an end-of-file indication.
- read.68.02
If ICANON is set, the EOF character shall be discarded when processed.
- read.69.01
Special character on input, which is recognized if the ICANON flag is set. It is the line delimiter newline.
- read.70
Special character on input, which is recognized if the ICANON flag is set. It is an additional line delimiter, like NL.
- read.71.01
Special character on input, which is recognized if the ICANON flag is set; it is the carriage-return character.
- read.71.02
If IGNCR is not set and ICRNL is set, a received CR character shall be translated into an NL character.
When ICANON and ICRNL are set and IGNCR is not set, this character shall be translated into an NL, and shall have the same effect as an NL character.
- read.72
If IGNPAR is set, a byte with a framing or parity error (other than break) shall be ignored.
- read.73.01
If PARMRK is set, and IGNPAR is not set, a byte with a framing or parity error (other than break) shall be given to the application as the three-byte sequence 0xff 0x00 X, where 0xff 0x00 is a two-byte flag preceding each sequence and X is the data of the byte received in error.
- read.73.02
To avoid ambiguity in this case, if ISTRIP is not set, a valid byte of 0xff is given to the application as 0xff 0xff.
- read.73.03
If neither PARMRK nor IGNPAR is set, a framing or parity error (other than break) shall be given to the application as a single byte 0x00.
- read.74
If INPCK is set, input parity checking shall be enabled.
- read.75
If ISTRIP is set, valid input bytes shall first be stripped to seven bits; otherwise, all eight bits shall be processed
- read.76.01
If INLCR is set, a received NL character shall be translated into a CR character.
- read.76.02
If IGNCR is set, a received CR character shall be ignored (not read).
- read.77
If IXANY is set, any input character shall restart output that has been suspended.
- read.79
If the O_NONBLOCK flag is clear, then the read request shall be blocked until data is available or a signal has been received.
- read.80.01
This means that a read request shall not return until an entire line has been typed or a signal has been received.
- read.80.02
Also, no matter how many bytes are requested in the read() call, at most one line shall be returned.
- read.81.01
Therefore, if O_NONBLOCK is set, read() may return immediately, regardless of the setting of MIN or TIME.
- read.82.01
As soon as one byte is received, the inter-byte timer shall be started.
In case A, TIME serves as an inter-byte timer which shall be activated after the first byte is received.
- read.82.02
Since it is an inter-byte timer, it shall be reset after a byte is received.
- read.82.03
If MIN bytes are received before the inter-byte timer expires (remember that the timer is reset upon receipt of each byte), the read shall be satisfied.
- read.82.04
If the timer expires before MIN bytes are received, the characters received to that point shall be returned to the user.
- read.82.05
Note that if TIME expires at least one byte shall be returned because the timer would not have been enabled unless a byte was received.
- read.83.01
In case B, since the value of TIME is zero, the timer plays no role and only MIN is significant. A pending read shall not be satisfied until MIN bytes are received (that is, the pending read shall block until MIN bytes are received), or a signal is received.
- read.83.02.03
If bytes are not received, the read shall not block indefinitely waiting for a byte; if no byte is received within TIME*0.1 seconds after the read is initiated, the read() shall return a value of zero, having read no data.
- read.84.01
In case C, since MIN=0, TIME no longer represents an inter-byte timer. It now serves as a read timer that shall be activated as soon as the read() function is processed.
- read.84.02
A read shall be satisfied as soon as a single byte is received or the read timer expires.
- read.84.02.01
Note that in case C if the timer expires, no bytes shall be returned.
- read.84.02.02
If the timer does not expire, the only way the read can be satisfied is if a byte is received.
- read.85
The minimum of either the number of bytes requested or the number of bytes currently available shall be returned without waiting for more bytes to be input. If no characters are available, read() shall return a value of zero, having read no data.
- [+]readv (64 / 20 / 0)
- readv.01
The readv() function shall place the input data into the iovcnt buffers specified by the members of the iov array: iov[0], iov[1], ..., iov[ iovcnt-1].
- app.readv.02
The iovcnt argument is valid if greater than 0 and less than or equal to {IOV_MAX}.
- readv.03
Each iovec entry specifies the base address and length of an area in memory where data should be placed.
- readv.04
The readv() function shall always fill an area completely before proceeding to the next.
- readv.05
Upon successful completion, readv() shall mark for update the st_atime field of the file.
- readv.06
In addition, the readv() function shall fail if:
- readv.06.01
[EINVAL] The sum of the iov_len values in the iov array overflowed an ssize_t.
- readv.07
The readv() function may fail if:
- readv.07.01
[EINVAL] The iovcnt argument was less than or equal to 0, or greater than {IOV_MAX}.
- readv.45
The read() function shall fail if:
- readv.45.01
[EAGAIN] or [EWOULDBLOCK] The file descriptor is for a socket, is marked O_NONBLOCK, and no data is waiting to be received.
- readv.45.02
[ECONNRESET] A read was attempted on a socket and the connection was forcibly closed by its peer.
- readv.45.03
[ENOTCONN] A read was attempted on a socket that is not connected.
- readv.45.04
[ETIMEDOUT] A read was attempted on a socket and a transmission timeout occurred.
- readv.pread.05
On files that support seeking (for example, a regular file), the read() shall start at a position in the file given by the file offset associated with fildes.
- readv.pread.06
The file offset shall be incremented by the number of bytes actually read.
- readv.pread.07
Files that do not support seeking-for example, terminals-always read from the current position.
- readv.pread.08
If the starting position is at or after the end-of-file, 0 shall be returned.
- readv.pread.09
When attempting to read from an empty pipe or FIFO:
- readv.pread.09.01
If no process has the pipe open for writing, read() shall return 0 to indicate end-of-file.
- readv.pread.09.02
If some process has the pipe open for writing and O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- readv.pread.09.03
If some process has the pipe open for writing and O_NONBLOCK is clear, read() shall block the calling thread until some data is written or the pipe is closed by all processes that had the pipe open for writing.
- readv.pread.10
When attempting to read a file (other than a pipe or FIFO) that supports non-blocking reads and has no data currently available:
- readv.pread.10.01
If O_NONBLOCK is set, read() shall return -1 and set errno to [EAGAIN].
- readv.pread.10.02 (struct)
If O_NONBLOCK is clear, read() shall block the calling thread until some data becomes available.
- readv.pread.10.03
The use of the O_NONBLOCK flag has no effect if there is some data available.
- readv.pread.11
If any portion of a regular file prior to the end-of-file has not been written, read() shall return bytes with value 0.
- readv.pread.12
If data is later written at this point, subsequent reads in the gap between the previous end of data and the newly written data shall return bytes with value 0 until data is written into the gap.
- readv.pread.13.01
Upon successful completion, where nbyte is greater than 0, read() shall mark for update the st_atime field of the file
- readv.pread.13.02
and shall return the number of bytes read. This number shall never be greater than nbyte.
- readv.pread.14
The value returned may be less than nbyte
- readv.pread.14.01
if the number of bytes left in the file is less than nbyte,
- readv.pread.14.02
if the read() request was interrupted by a signal,
- readv.pread.14.03
or if the file is a pipe or FIFO or special file and has fewer than nbyte bytes immediately available for reading.
- readv.pread.15
If a read() is interrupted by a signal before it reads any data, it shall return -1 with errno set to [EINTR].
- readv.pread.16
If a read() is interrupted by a signal after it has successfully read some data, it shall return the number of bytes read.
- readv.pread.17
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- readv.pread.18
If the O_DSYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion.
- readv.pread.19
If the O_SYNC and O_RSYNC bits have been set, read I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- readv.pread.22
The default shall be byte-stream mode.
- readv.pread.23
In byte-stream mode, read() shall retrieve data from the STREAM until as many bytes as were requested are transferred, or until there is no more data to be retrieved. Byte-stream mode ignores message boundaries.
- readv.pread.24
In STREAMS message-nondiscard mode, read() shall retrieve data until as many bytes as were requested are transferred, or until a message boundary is reached.
- readv.pread.25
If read() does not retrieve all the data in a message, the remaining data shall be left on the STREAM, and can be retrieved by the next read() call.
- readv.pread.26
Message-discard mode also retrieves data until as many bytes as were requested are transferred, or a message boundary is reached.
- readv.pread.27
However, unread data remaining in a message after the read() returns shall be discarded, and shall not be available for a subsequent read(), getmsg(), or getpmsg() call.
- readv.pread.28
In byte-stream mode, read() shall accept data until it has read nbyte bytes, or until there is no more data to read, or until a zero-byte message block is encountered.
- readv.pread.29
The read() function shall then return the number of bytes read, and place the zero-byte message back on the STREAM to be retrieved by the next read(), getmsg(), or getpmsg().
- readv.pread.30
In message-nondiscard mode or message-discard mode, a zero-byte message shall return 0 and the message shall be removed from the STREAM.
- readv.pread.31
When a zero-byte message is read as the first message on a STREAM, the message shall be removed from the STREAM and 0 shall be returned, regardless of the read mode.
- readv.pread.32
A read() from a STREAMS file shall return the data in the message at the front of the STREAM head read queue, regardless of the priority band of the message.
- readv.pread.33
The read() shall fail if a message containing a control part is encountered at the STREAM head.
- readv.pread.34
In control-data mode, read() shall convert any control part to data and pass it to the application before passing any data part originally present in the same message.
- readv.pread.35
In control-discard mode, read() shall discard message control parts but return to the process any data part in the message.
- readv.pread.36
In addition, read() shall fail if the STREAM head had processed an asynchronous error before the call. In this case, the value of errno shall not reflect the result of read(), but reflect the prior error.
- readv.pread.37.01
If a hangup occurs on the STREAM being read, read() shall continue to operate normally until the STREAM head read queue is empty.
- readv.pread.37.02
Thereafter, it shall return 0.
- readv.pread.41.01
Upon successful completion, read() [XSI] and pread() shall return a non-negative integer indicating the number of bytes actually read.
- readv.pread.41.02
Otherwise, the functions shall return -1 and set errno to indicate the error.
- readv.pread.42
The read() and [XSI] pread() functions shall fail if:
- readv.pread.42.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed.
- readv.pread.42.02
[EBADF] The fildes argument is not a valid file descriptor open for reading.
- readv.pread.42.03
[EBADMSG] [XSR] The file is a STREAM file that is set to control-normal mode and the message waiting to be read includes a control part.
- readv.pread.42.04
[EINTR] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- readv.pread.42.05
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- readv.pread.42.06
[EIO] The process is a member of a background process attempting to read from its controlling terminal, the process is ignoring or blocking the SIGTTIN signal, or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- readv.pread.42.07
[EISDIR] [XSI] The fildes argument refers to a directory and the implementation does not allow the directory to be read using read() or pread(). The readdir() function should be used instead.
- readv.pread.42.08
[EOVERFLOW] The file is a regular file, nbyte is greater than 0, the starting position is before the end-of-file, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- readv.pread.44
The read() and [XSI] pread() functions may fail if:
- readv.pread.44.01
[EIO] A physical I/O error has occurred.
- readv.pread.44.02
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- readv.pread.44.03
[ENOMEM] Insufficient memory was available to fulfill the request.
- readv.pread.44.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- readv.pread.50
If the file refers to a device special file, the result of subsequent read() requests is implementation-defined.
- readv.pread.52
The read() function reads data previously written to a file.
- app.readv.pread.02
The behavior of multiple concurrent reads on the same pipe, FIFO, or terminal device is unspecified.
- app.readv.pread.20
If fildes refers to a shared memory object, the result of the read() function is unspecified.
- app.readv.pread.21
If fildes refers to a typed memory object, the result of the read() function is unspecified.
- [+]sync (2 / 0 / 0)
- sync.01
The sync() function shall cause all information in memory that updates file systems to be scheduled for writing out to all file systems.
- sync.02
The writing, although scheduled, is not necessarily complete upon return from sync().
- [+]truncate (22 / 7 / 0)
- truncate.01
The truncate() function shall cause the regular file named by path to have a size which shall be equal to length bytes.
- truncate.02
If the file previously was larger than length, the extra data is discarded.
- truncate.03
If the file was previously shorter than length, its size is increased, and the extended area appears as if it were zero-filled.
- truncate.04
If the request would cause the file size to exceed the soft file size limit for the process, the request shall fail and the implementation shall generate the SIGXFSZ signal for the process.
- truncate.05
This function shall not modify the file offset for any open file descriptions associated with the file.
- truncate.06
Upon successful completion, if the file size is changed, this function shall mark for update the st_ctime and st_mtime fields of the file, and the S_ISUID and S_ISGID bits of the file mode may be cleared.
- truncate.07.01
Upon successful completion, truncate() shall return 0.
- truncate.07.02
Otherwise, -1 shall be returned, and errno set to indicate the error.
- truncate.08
The truncate() function shall fail if:
- truncate.08.01
[EINTR] A signal was caught during execution.
- truncate.08.02
[EINVAL] The length argument was less than 0.
- truncate.08.03
[EFBIG] or [EINVAL] The length argument was greater than the maximum file size.
- truncate.08.04
[EIO] An I/O error occurred while reading from or writing to a file system.
- truncate.08.05
[EACCES] A component of the path prefix denies search permission, or write permission is denied on the file.
- truncate.08.06
[EISDIR] The named file is a directory.
- truncate.08.07
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- truncate.08.08
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- truncate.08.09
[ENOENT] A component of path does not name an existing file or path is an empty string.
- truncate.08.10
[ENOTDIR] A component of the path prefix of path is not a directory.
- truncate.08.11
[EROFS] The named file resides on a read-only file system.
- truncate.09
The truncate() function may fail if:
- truncate.09.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- truncate.09.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- truncate.10
The application shall ensure that the process has write permission for the file.
- [+]truncate64 (22 / 7 / 0)
- truncate64.truncate.01
The truncate() function shall cause the regular file named by path to have a size which shall be equal to length bytes.
- truncate64.truncate.02
If the file previously was larger than length, the extra data is discarded.
- truncate64.truncate.03
If the file was previously shorter than length, its size is increased, and the extended area appears as if it were zero-filled.
- truncate64.truncate.04
If the request would cause the file size to exceed the soft file size limit for the process, the request shall fail and the implementation shall generate the SIGXFSZ signal for the process.
- truncate64.truncate.05
This function shall not modify the file offset for any open file descriptions associated with the file.
- truncate64.truncate.06
Upon successful completion, if the file size is changed, this function shall mark for update the st_ctime and st_mtime fields of the file, and the S_ISUID and S_ISGID bits of the file mode may be cleared.
- truncate64.truncate.07.01
Upon successful completion, truncate() shall return 0.
- truncate64.truncate.07.02
Otherwise, -1 shall be returned, and errno set to indicate the error.
- truncate64.truncate.08
The truncate() function shall fail if:
- truncate64.truncate.08.01
[EINTR] A signal was caught during execution.
- truncate64.truncate.08.02
[EINVAL] The length argument was less than 0.
- truncate64.truncate.08.03
[EFBIG] or [EINVAL] The length argument was greater than the maximum file size.
- truncate64.truncate.08.04
[EIO] An I/O error occurred while reading from or writing to a file system.
- truncate64.truncate.08.05
[EACCES] A component of the path prefix denies search permission, or write permission is denied on the file.
- truncate64.truncate.08.06
[EISDIR] The named file is a directory.
- truncate64.truncate.08.07
[ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
- truncate64.truncate.08.08
[ENAMETOOLONG] The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- truncate64.truncate.08.09
[ENOENT] A component of path does not name an existing file or path is an empty string.
- truncate64.truncate.08.10
[ENOTDIR] A component of the path prefix of path is not a directory.
- truncate64.truncate.08.11
[EROFS] The named file resides on a read-only file system.
- truncate64.truncate.09
The truncate() function may fail if:
- truncate64.truncate.09.01
[ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- truncate64.truncate.09.02
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- truncate64.truncate.10
The application shall ensure that the process has write permission for the file.
- [+]write (95 / 27 / 0)
- write.01 (struct)
The write() function shall attempt to write nbyte bytes from the buffer pointed to by buf to the file associated with the open file descriptor, fildes.
- write.02.01
Before any action described below is taken, and if nbyte is zero and the file is a regular file, the write() function may detect and return errors as described below.
- write.02.02
In the absence of errors, or if error detection is not performed, the write() function shall return zero and have no other results.
- app.write.03
If nbyte is zero and the file is not a regular file, the results are unspecified.
- write.04
On a regular file or other file capable of seeking, the actual writing of data shall proceed from the position in the file indicated by the file offset associated with fildes.
- write.05
Before successful return from write(), the file offset shall be incremented by the number of bytes actually written.
- write.06
On a regular file, if this incremented file offset is greater than the length of the file, the length of the file shall be set to this file offset.
- write.07
On a file not capable of seeking, writing shall always take place starting at the current position.
- write.08.01
If the O_APPEND flag of the file status flags is set, the file offset shall be set to the end of the file prior to each write
- write.08.02
no intervening file modification operation shall occur between changing the file offset and the write operation.
- write.09
If a write() requests that more bytes be written than there is room for (for example, [XSI] the process' file size limit or the physical end of a medium), only as many bytes as there is room for shall be written.
- write.10
If the request would cause the file size to exceed the soft file size limit for the process and there is no room for any bytes to be written, the request shall fail and the implementation shall generate the SIGXFSZ signal for the thread.
- write.11
If write() is interrupted by a signal before it writes any data, it shall return -1 with errno set to [EINTR].
- write.12
If write() is interrupted by a signal after it successfully writes some data, it shall return the number of bytes written.
- app.write.13
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- write.14
Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified.
- write.15
Any subsequent successful write() to the same byte position in the file shall overwrite that file data.
- write.16
There is no file offset associated with a pipe, hence each write request shall append to the end of the pipe.
- write.17.01
Write requests of {PIPE_BUF} bytes or less shall not be interleaved with data from other processes doing writes on the same pipe.
- write.17.02
Writes of greater than {PIPE_BUF} bytes may have data interleaved, on arbitrary boundaries, with writes by other processes, whether or not the O_NONBLOCK flag of the file status flags is set.
- write.18
If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte.
- write.19
If the O_NONBLOCK flag is set, write() requests shall be handled differently, in the following ways:
- write.19.01
The write() function shall not block the thread.
- write.19.02.01
A write request for {PIPE_BUF} or fewer bytes shall have the following effect: if there is sufficient space available in the pipe, write() shall transfer all the data and return the number of bytes requested.
- write.19.02.02
Otherwise, write() shall transfer no data and return -1 with errno set to [EAGAIN].
- write.19.03
A write request for more than {PIPE_BUF} bytes shall cause one of the following:
- write.19.03.01
When at least one byte can be written, transfer what it can and return the number of bytes written. When all data previously written to the pipe is read, it shall transfer at least {PIPE_BUF} bytes.
- write.19.03.02
When no data can be written, transfer no data, and return -1 with errno set to [EAGAIN].
- write.20
When attempting to write to a file descriptor (other than a pipe or FIFO) that supports non-blocking writes and cannot accept the data immediately:
- write.20.01 (struct)
If the O_NONBLOCK flag is clear, write() shall block the calling thread until the data can be accepted.
- write.20.02.01
If the O_NONBLOCK flag is set, write() shall not block the thread.
- write.20.02.02
If some data can be written without blocking the thread, write() shall write what it can and return the number of bytes written.
- write.20.02.03
Otherwise, it shall return -1 and set errno to [EAGAIN].
- write.22.01
Upon successful completion, where nbyte is greater than 0, write() shall mark for update the st_ctime and st_mtime fields of the file,
- write.22.02
if the file is a regular file, the S_ISUID and S_ISGID bits of the file mode may be cleared.
- write.23
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- write.24
If the O_DSYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion
- write.25
If the O_SYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- app.write.26
If fildes refers to a shared memory object, the result of the write() function is unspecified.
- app.write.27
If fildes refers to a typed memory object, the result of the write() function is unspecified.
- write.28
If fildes refers to a STREAM, the operation of write() shall be determined by the values of the minimum and maximum nbyte range (packet size) accepted by the STREAM.
- write.29
If nbyte falls within the packet size range, nbyte bytes shall be written.
- write.30
If nbyte does not fall within the range and the minimum packet size value is 0, write() shall break the buffer into maximum packet size segments prior to sending the data downstream (the last segment may contain less than the maximum packet size).
- write.31
If nbyte does not fall within the range and the minimum value is non-zero, write() shall fail with errno set to [ERANGE].
- write.32
Writing a zero-length buffer ( nbyte is 0) to a STREAMS device sends 0 bytes with 0 returned
- write.33
However, writing a zero-length buffer to a STREAMS-based pipe or FIFO sends no message and 0 is returned.
- write.34
When writing to a STREAM, data messages are created with a priority band of 0.
- write.35
When writing to a STREAM that is not a pipe or FIFO:
- write.35.01
If O_NONBLOCK is clear, and the STREAM cannot accept data (the STREAM write queue is full due to internal flow control conditions), write() shall block until data can be accepted.
- write.35.02
If O_NONBLOCK is set and the STREAM cannot accept data, write() shall return -1 and set errno to [EAGAIN].
- write.35.03
If O_NONBLOCK is set and part of the buffer has been written while a condition in which the STREAM cannot accept additional data occurs, write() shall terminate and return the number of bytes written.
- write.36.01
In addition, write() shall fail if the STREAM head has processed an asynchronous error before the call.
- write.36.02
In this case, the value of errno does not reflect the result of write(), but reflects the prior error.
- write.40.01 (struct)
Upon successful completion, write() [XSI] and pwrite() shall return the number of bytes actually written to the file associated with fildes.
- write.40.02
This number shall never be greater than nbyte.
- write.40.03
Otherwise, -1 shall be returned and errno set to indicate the error.
- write.41
The write() and [XSI] pwrite() functions shall fail if:
- write.41.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write() operation.
- write.41.02
[EBADF] The fildes argument is not a valid file descriptor open for writing.
- write.41.03
[EFBIG] An attempt was made to write a file that exceeds the implementation-defined maximum file size [XSI] or the process' file size limit, and there was no room for any bytes to be written.
- write.41.04
[EFBIG] The file is a regular file, nbyte is greater than 0, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- write.41.05
[EINTR] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- write.41.06
[EIO] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- write.41.07
[ENOSPC] There was no free space remaining on the device containing the file.
- write.41.08
[EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process, or that only has one end open. A SIGPIPE signal shall also be sent to the thread.
- write.41.09
[ERANGE] [XSR] The transfer request size was outside the range supported by the STREAMS file associated with fildes.
- write.42
The write() function shall fail if:
- write.42.01
[EAGAIN] or [EWOULDBLOCK] The file descriptor is for a socket, is marked O_NONBLOCK, and write would block.
- write.42.02
[ECONNRESET] A write was attempted on a socket that is not connected.
- write.42.03
[EPIPE] A write was attempted on a socket that is shut down for writing, or is no longer connected. In the latter case, if the socket is of type SOCK_STREAM, a SIGPIPE signal shall also be sent to the thread.
- write.43
The write() and [XSI] pwrite() functions may fail if:
- write.43.01
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- write.43.02
[EIO] A physical I/O error has occurred.
- write.43.03
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- write.43.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- write.43.05
[ENXIO] [XSR] A hangup occurred on the STREAM being written to.
- write.44
The write() function may fail if:
- write.44.01
[EACCES] A write was attempted on a socket and the calling process does not have appropriate privileges.
- write.44.02
[ENETDOWN] A write was attempted on a socket and the local network interface used to reach the destination is down.
- write.44.03
[ENETUNREACH] A write was attempted on a socket and no route to the network is present.
- write.46
A write to a STREAMS file may fail if an error message has been received at the STREAM head. In this case, errno is set to the value included in the error message.
- write.50
Any subsequent write() to the terminal device shall return -1, with errno set to [EIO], until the device is closed.
- write.60.01
If OPOST is set, output data shall be post-processed as described below, so that lines of text are modified to appear appropriately on the terminal device;
- write.60.02
otherwise, characters shall be transmitted without change.
- write.61.01
If ONLCR is set, the NL character shall be transmitted as the CR-NL character pair.
- write.61.01.02.01
Newline delay shall last about 0.10 seconds.
- write.61.01.02.02
If OFILL is set, two fill characters shall be transmitted.
- write.61.01.03.01
Carriage-return delay type 1 shall be dependent on the current column position,
- write.61.01.03.02
type 2 shall be about 0.10 seconds,
- write.61.01.03.03
and type 3 shall be about 0.15 seconds.
- write.61.01.03.04.01
If OFILL is set, delay type 1 shall transmit two fill characters,
- write.61.01.03.04.02
and type 2 four fill characters.
- write.61.01.04.01
Horizontal-tab delay type 1 shall be dependent on the current column position.
- write.61.01.04.02
Type 2 shall be about 0.10 seconds.
- write.61.01.04.03
Type 3 specifies that tabs shall be expanded into spaces.
- write.61.01.04.04
If OFILL is set, two fill characters shall be transmitted for any delay.
- write.61.01.05.01
Backspace delay shall last about 0.05 seconds.
- write.61.01.05.02
If OFILL is set, one fill character shall be transmitted.
- write.61.02
If OCRNL is set, the CR character shall be transmitted as the NL character.
- write.61.03
If ONOCR is set, no CR character shall be transmitted when at column 0 (first position).
- write.61.04
If ONLRET is set, the NL character is assumed to do the carriage-return function;
- write.61.04.01
the column pointer shall be set to 0
- write.61.04.02
If ONLRET is set, the carriage-return delays shall be used instead of the newline delays.
and the delays specified for CR shall be used.
- write.61.05
Otherwise, the NL character is assumed to do just the line-feed function; the column pointer remains unchanged.
- write.61.06
The column pointer shall also be set to 0 if the CR character is actually transmitted.
- write.62.01
The delay bits specify how long transmission stops to allow for mechanical or other movement when certain characters are sent to the terminal.
- write.62.01.01.01
If a form-feed or vertical-tab delay is specified, it shall last for about 2 seconds.
- write.62.01.01.02
If a form-feed or vertical-tab delay is specified, it shall last for about 2 seconds.
- write.62.02
In all cases a value of 0 shall indicate no delay.
- write.62.03
If OFILL is set, fill characters shall be transmitted for delay instead of a timed delay.
- write.62.04.01
If OFDEL is set, the fill character shall be DEL;
- write.62.04.02
otherwise, NUL.
- write.63
The actual delays depend on line speed and system load.
- [+]writev (66 / 20 / 0)
- writev.01
The writev() function shall gather output data from the iovcnt buffers specified by the members of the iov array: iov[0], iov[1], ..., iov[iovcnt-1].
- writev.02
The iovcnt argument is valid if greater than 0 and less than or equal to {IOV_MAX}, as defined in <limits.h>.
- writev.03
Each iovec entry specifies the base address and length of an area in memory from which data should be written. The writev() function shall always write a complete area before proceeding to the next.
- writev.04
If fildes refers to a regular file and all of the iov_len members in the array pointed to by iov are 0, writev() shall return 0 and have no other effect.
- app.writev.05
For other file types, the behavior is unspecified.
- writev.06
If the sum of the iov_len values is greater than {SSIZE_MAX}, the operation shall fail and no data shall be transferred.
- writev.07.01 (struct)
Upon successful completion, writev() shall return the number of bytes actually written.
- writev.07.02
Otherwise, it shall return a value of -1,
- writev.07.03
the file-pointer shall remain unchanged,
- writev.07.04
and errno shall be set to indicate an error.
- writev.08
In addition, the writev() function shall fail if:
- writev.08.01
[EINVAL] The sum of the iov_len values in the iov array would overflow an ssize_t.
- writev.09
The writev() function may fail and set errno to:
- writev.09.01
[EINVAL] The iovcnt argument was less than or equal to 0, or greater than {IOV_MAX}.
- writev.11
Before successful return from write(), the file offset shall be incremented by the number of bytes actually written.
- writev.12
On a regular file, if this incremented file offset is greater than the length of the file, the length of the file shall be set to this file offset.
- writev.42
The write() function shall fail if:
- writev.42.01
[EAGAIN] or [EWOULDBLOCK] The file descriptor is for a socket, is marked O_NONBLOCK, and write would block.
- writev.42.02
[ECONNRESET] A write was attempted on a socket that is not connected.
- writev.42.03
[EPIPE] A write was attempted on a socket that is shut down for writing, or is no longer connected. In the latter case, if the socket is of type SOCK_STREAM, a SIGPIPE signal shall also be sent to the thread.
- writev.44
The write() function may fail if:
- writev.44.01
[EACCES] A write was attempted on a socket and the calling process does not have appropriate privileges.
- writev.44.02
[ENETDOWN] A write was attempted on a socket and the local network interface used to reach the destination is down.
- writev.44.03
[ENETUNREACH] A write was attempted on a socket and no route to the network is present.
- app.writev.pwrite.13
If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
- app.writev.pwrite.26
If fildes refers to a shared memory object, the result of the write() function is unspecified.
- app.writev.pwrite.27
If fildes refers to a typed memory object, the result of the write() function is unspecified.
- writev.pwrite.04
On a regular file or other file capable of seeking, the actual writing of data shall proceed from the position in the file indicated by the file offset associated with fildes.
- writev.pwrite.07
On a file not capable of seeking, writing shall always take place starting at the current position.
- writev.pwrite.08.01
If the O_APPEND flag of the file status flags is set, the file offset shall be set to the end of the file prior to each write
- writev.pwrite.08.02
no intervening file modification operation shall occur between changing the file offset and the write operation.
- writev.pwrite.09
If a write() requests that more bytes be written than there is room for (for example, [XSI] the process' file size limit or the physical end of a medium), only as many bytes as there is room for shall be written.
- writev.pwrite.10
If the request would cause the file size to exceed the soft file size limit for the process and there is no room for any bytes to be written, the request shall fail and the implementation shall generate the SIGXFSZ signal for the thread.
- writev.pwrite.11
If write() is interrupted by a signal before it writes any data, it shall return -1 with errno set to [EINTR].
- writev.pwrite.12
If write() is interrupted by a signal after it successfully writes some data, it shall return the number of bytes written.
- writev.pwrite.14
Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified.
- writev.pwrite.15
Any subsequent successful write() to the same byte position in the file shall overwrite that file data.
- writev.pwrite.16
There is no file offset associated with a pipe, hence each write request shall append to the end of the pipe.
- writev.pwrite.17.01
Write requests of {PIPE_BUF} bytes or less shall not be interleaved with data from other processes doing writes on the same pipe.
- writev.pwrite.17.02
Writes of greater than {PIPE_BUF} bytes may have data interleaved, on arbitrary boundaries, with writes by other processes, whether or not the O_NONBLOCK flag of the file status flags is set.
- writev.pwrite.18
If the O_NONBLOCK flag is clear, a write request may cause the thread to block, but on normal completion it shall return nbyte.
- writev.pwrite.19
If the O_NONBLOCK flag is set, write() requests shall be handled differently, in the following ways:
- writev.pwrite.19.01
The write() function shall not block the thread.
- writev.pwrite.19.02.01
A write request for {PIPE_BUF} or fewer bytes shall have the following effect: if there is sufficient space available in the pipe, write() shall transfer all the data and return the number of bytes requested.
- writev.pwrite.19.02.02
Otherwise, write() shall transfer no data and return -1 with errno set to [EAGAIN].
- writev.pwrite.19.03
A write request for more than {PIPE_BUF} bytes shall cause one of the following:
- writev.pwrite.19.03.01
When at least one byte can be written, transfer what it can and return the number of bytes written. When all data previously written to the pipe is read, it shall transfer at least {PIPE_BUF} bytes.
- writev.pwrite.19.03.02
When no data can be written, transfer no data, and return -1 with errno set to [EAGAIN].
- writev.pwrite.20
When attempting to write to a file descriptor (other than a pipe or FIFO) that supports non-blocking writes and cannot accept the data immediately:
- writev.pwrite.20.01 (struct)
If the O_NONBLOCK flag is clear, write() shall block the calling thread until the data can be accepted.
- writev.pwrite.20.02.01
If the O_NONBLOCK flag is set, write() shall not block the thread.
- writev.pwrite.20.02.02
If some data can be written without blocking the thread, write() shall write what it can and return the number of bytes written.
- writev.pwrite.20.02.03
Otherwise, it shall return -1 and set errno to [EAGAIN].
- writev.pwrite.22.01
Upon successful completion, where nbyte is greater than 0, write() shall mark for update the st_ctime and st_mtime fields of the file,
- writev.pwrite.22.02
if the file is a regular file, the S_ISUID and S_ISGID bits of the file mode may be cleared.
- writev.pwrite.23
For regular files, no data transfer shall occur past the offset maximum established in the open file description associated with fildes.
- writev.pwrite.24
If the O_DSYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O data integrity completion
- writev.pwrite.25
If the O_SYNC bit has been set, write I/O operations on the file descriptor shall complete as defined by synchronized I/O file integrity completion.
- writev.pwrite.28
If fildes refers to a STREAM, the operation of write() shall be determined by the values of the minimum and maximum nbyte range (packet size) accepted by the STREAM.
- writev.pwrite.34
When writing to a STREAM, data messages are created with a priority band of 0.
- writev.pwrite.35
When writing to a STREAM that is not a pipe or FIFO:
- writev.pwrite.35.01
If O_NONBLOCK is clear, and the STREAM cannot accept data (the STREAM write queue is full due to internal flow control conditions), write() shall block until data can be accepted.
- writev.pwrite.35.02
If O_NONBLOCK is set and the STREAM cannot accept data, write() shall return -1 and set errno to [EAGAIN].
- writev.pwrite.35.03
If O_NONBLOCK is set and part of the buffer has been written while a condition in which the STREAM cannot accept additional data occurs, write() shall terminate and return the number of bytes written.
- writev.pwrite.36.01
In addition, write() shall fail if the STREAM head has processed an asynchronous error before the call.
- writev.pwrite.36.02
In this case, the value of errno does not reflect the result of write(), but reflects the prior error.
- writev.pwrite.41
The write() and [XSI] pwrite() functions shall fail if:
- writev.pwrite.41.01
[EAGAIN] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write() operation.
- writev.pwrite.41.02
[EBADF] The fildes argument is not a valid file descriptor open for writing.
- writev.pwrite.41.03
[EFBIG] An attempt was made to write a file that exceeds the implementation-defined maximum file size [XSI] or the process' file size limit, and there was no room for any bytes to be written.
- writev.pwrite.41.04
[EFBIG] The file is a regular file, nbyte is greater than 0, and the starting position is greater than or equal to the offset maximum established in the open file description associated with fildes.
- writev.pwrite.41.05
[EINTR] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- writev.pwrite.41.06
[EIO] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- writev.pwrite.41.07
[ENOSPC] There was no free space remaining on the device containing the file.
- writev.pwrite.41.08
[EPIPE] An attempt is made to write to a pipe or FIFO that is not open for reading by any process, or that only has one end open. A SIGPIPE signal shall also be sent to the thread.
- writev.pwrite.41.09
[ERANGE] [XSR] The transfer request size was outside the range supported by the STREAMS file associated with fildes.
- writev.pwrite.43
The write() and [XSI] pwrite() functions may fail if:
- writev.pwrite.43.01
[EINVAL] [XSR] The STREAM or multiplexer referenced by fildes is linked (directly or indirectly) downstream from a multiplexer.
- writev.pwrite.43.02
[EIO] A physical I/O error has occurred.
- writev.pwrite.43.03
[ENOBUFS] Insufficient resources were available in the system to perform the operation.
- writev.pwrite.43.04
[ENXIO] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- writev.pwrite.43.05
[ENXIO] [XSR] A hangup occurred on the STREAM being written to.
- [+]io.fstream.buffer (23 / 6 / 0)
- [+]setbuf (8 / 1 / 0)
- setbuf.01
Except that it returns no value, the function call:setbuf(stream, buf)shall be equivalent to:setvbuf(stream, buf, _IOFBF, BUFSIZ)if buf is not a null pointer, or to:
- setbuf.02
setvbuf(stream, buf, _IONBF, BUFSIZ)if buf is a null pointer.
- setbuf.03
The setbuf() function shall not return a value.
- app.setbuf.setvbuf.01
The setvbuf() function may be used after the stream pointed to by stream is associated with an open file but before any other operation (other than an unsuccessful call to setvbuf()) is performed on the stream.
- setbuf.setvbuf.02.01
{_IOFBF} shall cause input/output to be fully buffered.
- setbuf.setvbuf.02.03
{_IONBF} shall cause input/output to be unbuffered.
- setbuf.setvbuf.03.01
If buf is not a null pointer, the array it points to may be used instead of a buffer allocated by setvbuf() and the argument size specifies the size of the array;
- setbuf.setvbuf.03.02
otherwise, size may determine the size of a buffer allocated by the setvbuf() function.
- setbuf.setvbuf.04
The contents of the array at any time are unspecified.
- [+]setbuffer (6 / 2 / 0)
- setbuffer.01
setbuffer() is an alias for the call to setvbuf(). It works the same, except that the size of the buffer in setbuffer() is up to the caller, rather than being determined by the default BUFSIZ.
- setbuffer.05.02
may set errno to indicate the error
- setbuffer.06
The setvbuf() function may fail if:
- setbuffer.06.01
[EBADF] [CX] The file descriptor underlying stream is not valid.
- app.setbuffer.setvbuf.01
The setvbuf() function may be used after the stream pointed to by stream is associated with an open file but before any other operation (other than an unsuccessful call to setvbuf()) is performed on the stream.
- app.setbuffer.setvbuf.03.01
If buf is not a null pointer, the array it points to may be used instead of a buffer allocated by setvbuf() and the argument size specifies the size of the array;
- setbuffer.setvbuf.03.01
If buf is not a null pointer, the array it points to may be used instead of a buffer allocated by setvbuf() and the argument size specifies the size of the array;
- setbuffer.setvbuf.03.02
otherwise, size may determine the size of a buffer allocated by the setvbuf() function.
- setbuffer.setvbuf.04
The contents of the array at any time are unspecified.
- [+]setvbuf (9 / 3 / 0)
- app.setvbuf.01
The setvbuf() function may be used after the stream pointed to by stream is associated with an open file but before any other operation (other than an unsuccessful call to setvbuf()) is performed on the stream.
- setvbuf.02
The argument type determines how stream shall be buffered, as follows:
- setvbuf.02.01
{_IOFBF} shall cause input/output to be fully buffered.
- setvbuf.02.02
{_IOLBF} shall cause input/output to be line buffered.
- setvbuf.02.03
{_IONBF} shall cause input/output to be unbuffered.
- setvbuf.03.01
If buf is not a null pointer, the array it points to may be used instead of a buffer allocated by setvbuf() and the argument size specifies the size of the array;
- setvbuf.03.02
otherwise, size may determine the size of a buffer allocated by the setvbuf() function.
- app.setvbuf.03.01
If buf is not a null pointer, the array it points to may be used instead of a buffer allocated by setvbuf() and the argument size specifies the size of the array;
- setvbuf.04
The contents of the array at any time are unspecified.
- setvbuf.05.01
Upon successful completion, setvbuf() shall return 0.
- setvbuf.05.02
Otherwise, it shall return a non-zero value if an invalid value is given for type or if the request cannot be honored, [CX] and may set errno to indicate the error.
- setvbuf.06
The setvbuf() function may fail if:
- setvbuf.06.01
[EBADF] [CX] The file descriptor underlying stream is not valid.
- [+]io.fstream.fstream (746 / 199 / 0)
- [+]_IO_feof (1 / 1 / 0)
- _IO_feof.01
_IO_feof() tests the end-of-file indicator for the stream pointed to by __fp, returning a non-zero value if it is set.
- [+]_IO_getc (2 / 2 / 0)
- _IO_getc.01.01
_IO_getc() reads the next character from __fp and returns it as an unsigned char cast to an int,
- _IO_getc.01.02
or EOF on end-of-file or error.
- [+]_IO_putc (1 / 1 / 0)
- _IO_putc.01
_IO_putc() writes the character __c, cast to an unsigned char, to __fp.
- [+]_IO_puts (1 / 0 / 0)
- _IO_puts.01
_IO_puts() writes the string __s and a trailing newline to stdout.
- [+]__fpending (1 / 1 / 0)
- __fpending.01
__fpending() returns the amount of output in bytes pending on a stream.
- [+]clearerr (1 / 1 / 0)
- clearerr.01
The clearerr() function shall clear the end-of-file and error indicators for the stream to which stream points.
- [+]fclose (19 / 6 / 0)
- fclose.01
The fclose() function shall cause the stream pointed to by stream to be flushed and the associated file to be closed.
- fclose.02.01
Any unwritten buffered data for the stream shall be written to the file;
- fclose.02.02
any unread buffered data shall be discarded.
- fclose.03
Whether or not the call succeeds, the stream shall be disassociated from the file and any buffer set by the setbuf() or setvbuf() function shall be disassociated from the stream.
- fclose.04
If the associated buffer was automatically allocated, it shall be deallocated.
- fclose.05
The fclose() function shall mark for update the st_ctime and st_mtime fields of the underlying file, if the stream was writable, and if buffered data remains that has not yet been written to the file.
- fclose.06
The fclose() function shall perform the equivalent of a close() on the file descriptor that is associated with the stream pointed to by stream
- app.fclose.07
After the call to fclose(), any use of stream results in undefined behavior.
- fclose.08.01
Upon successful completion, fclose() shall return 0;
- fclose.08.02
otherwise, it shall return EOF [CX] and set errno to indicate the error.
- fclose.09
The fclose() function shall fail if:
- fclose.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fclose.09.02
[EBADF] [CX] The file descriptor underlying stream is not valid.
- fclose.09.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fclose.09.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fclose.09.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fclose.09.06
[EINTR] [CX] The fclose() function was interrupted by a signal.
- fclose.09.07
[EIO] [CX] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fclose.09.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fclose.09.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fclose.10
The fclose() function may fail if:
- fclose.10.01
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fdopen (21 / 6 / 0)
- fdopen.01
The fdopen() function shall associate a stream with a file descriptor.
- fdopen.02
The mode argument is a character string having one of the following values:
- fdopen.02.01
r or rb Open a file for reading.
- fdopen.02.02
w or wb Open a file for writing.
- fdopen.02.03
a or ab Open a file for writing at end-of-file.
- fdopen.02.04
r+ or rb+ or r+b Open a file for update (reading and writing).
- fdopen.02.05
w+ or wb+ or w+b Open a file for update (reading and writing).
- fdopen.02.06
a+ or ab+ or a+b Open a file for update (reading and writing) at end-of-file.
- fdopen.03
The meaning of these flags is exactly as specified in fopen(), except that modes beginning with w shall not cause truncation of the file.
- fdopen.04
Additional values for the mode argument may be supported by an implementation.
- fdopen.05
The application shall ensure that the mode of the stream as expressed by the mode argument is allowed by the file access mode of the open file description to which fildes refers.
- fdopen.06
The file position indicator associated with the new stream is set to the position indicated by the file offset associated with the file descriptor.
- fdopen.07
The error and end-of-file indicators for the stream shall be cleared.
- fdopen.08
The fdopen() function may cause the st_atime field of the underlying file to be marked for update.
- app.fdopen.09
If fildes refers to a shared memory object, the result of the fdopen() function is unspecified.
- app.fdopen.10
If fildes refers to a typed memory object, the result of the fdopen() function is unspecified.
- fdopen.11
The fdopen() function shall preserve the offset maximum previously set for the open file description corresponding to fildes.
- fdopen.12.01
Upon successful completion, fdopen() shall return a pointer to a stream;
- fdopen.12.02
otherwise, a null pointer shall be returned and errno set to indicate the error.
- fdopen.13
The fdopen() function may fail if:
- fdopen.13.01
[EBADF] The fildes argument is not a valid file descriptor.
- fdopen.13.02
[EINVAL] The mode argument is not a valid mode.
- fdopen.13.03
[EMFILE] {FOPEN_MAX} streams are currently open in the calling process.
- fdopen.13.04
[EMFILE] {STREAM_MAX} streams are currently open in the calling process.
- fdopen.13.05
[ENOMEM] Insufficient space to allocate a buffer.
- [+]feof (2 / 2 / 0)
- feof.01
The feof() function shall test the end-of-file indicator for the stream pointed to by stream.
- feof.02
The feof() function shall return non-zero if and only if the end-of-file indicator is set for stream.
- [+]ferror (2 / 0 / 0)
- ferror.01
The ferror() function shall test the error indicator for the stream pointed to by stream.
- ferror.02
The ferror() function shall return non-zero if and only if the error indicator is set for stream.
- [+]fflush (15 / 2 / 0)
- fflush.01
If stream points to an output stream or an update stream in which the most recent operation was not input, fflush() shall cause any unwritten data for that stream to be written to the file,
- fflush.02
and the st_ctime and st_mtime fields of the underlying file shall be marked for update.
- fflush.03
If stream is a null pointer, fflush() shall perform this flushing action on all streams for which the behavior is defined above.
- fflush.04.01
Upon successful completion, fflush() shall return 0;
- fflush.04.02
otherwise, it shall set the error indicator for the stream, return EOF, [CX] and set errno to indicate the error.
- fflush.05
The fflush() function shall fail if:
- fflush.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fflush.05.02
[EBADF] [CX] The file descriptor underlying stream is not valid.
- fflush.05.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fflush.05.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fflush.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fflush.05.06
[EINTR] [CX] The fflush() function was interrupted by a signal.
- fflush.05.07
[EIO] [CX] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fflush.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fflush.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fflush.06
The fflush() function may fail if:
- fflush.06.01
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fflush_unlocked (16 / 2 / 0)
- fflush_unlocked.01
fflush_unlocked() is the same as fflush() except that it need not be thread safe. That is, it may only be invoked in the ways which are legal for getc_unlocked().
- fflush_unlocked.fflush.01
If stream points to an output stream or an update stream in which the most recent operation was not input, fflush() shall cause any unwritten data for that stream to be written to the file,
- fflush_unlocked.fflush.02
and the st_ctime and st_mtime fields of the underlying file shall be marked for update.
- fflush_unlocked.fflush.03
If stream is a null pointer, fflush() shall perform this flushing action on all streams for which the behavior is defined above.
- fflush_unlocked.fflush.04.01
Upon successful completion, fflush() shall return 0;
- fflush_unlocked.fflush.04.02
otherwise, it shall set the error indicator for the stream, return EOF, [CX] and set errno to indicate the error.
- fflush_unlocked.fflush.05
The fflush() function shall fail if:
- fflush_unlocked.fflush.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fflush_unlocked.fflush.05.02
[EBADF] [CX] The file descriptor underlying stream is not valid.
- fflush_unlocked.fflush.05.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fflush_unlocked.fflush.05.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fflush_unlocked.fflush.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fflush_unlocked.fflush.05.06
[EINTR] [CX] The fflush() function was interrupted by a signal.
- fflush_unlocked.fflush.05.07
[EIO] [CX] The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fflush_unlocked.fflush.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fflush_unlocked.fflush.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fflush_unlocked.fflush.06
The fflush() function may fail if:
- fflush_unlocked.fflush.06.01
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fgetc (15 / 8 / 0)
- fgetc.01.01
If the end-of-file indicator for the input stream pointed to by stream is not set and a next byte is present, the fgetc() function shall obtain the next byte as an unsigned char converted to an int, from the input stream pointed to by stream
- fgetc.01.02
and advance the associated file position indicator for the stream (if defined).
- fgetc.02
Since fgetc() operates on bytes, reading a character consisting of multiple bytes (or "a multi-byte character") may require multiple calls to fgetc().
- fgetc.03
The fgetc() function may mark the st_atime field of the file associated with stream for update.
- fgetc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- fgetc.05
Upon successful completion, fgetc() shall return the next byte from the input stream pointed to by stream.
- fgetc.06
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetc() shall return EOF.
- fgetc.07
If a read error occurs, the error indicator for the stream shall be set, fgetc() shall return EOF, [CX] and shall set errno to indicate the error.
- fgetc.08
The fgetc() function shall fail if data needs to be read and:
- fgetc.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- fgetc.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- fgetc.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- fgetc.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- fgetc.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- fgetc.09
The fgetc() function may fail if:
- fgetc.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- fgetc.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fgetpos (7 / 2 / 0)
- fgetpos.01
The fgetpos() function shall store the current values of the parse state (if any) and file position indicator for the stream pointed to by stream in the object pointed to by pos.
- fgetpos.02
The value stored contains unspecified information usable by fsetpos() for repositioning the stream to its position at the time of the call to fgetpos().
- fgetpos.03.01
Upon successful completion, fgetpos() shall return 0;
- fgetpos.03.02
otherwise, it shall return a non-zero value and set errno to indicate the error.
- fgetpos.04
The fgetpos() function shall fail if:
- fgetpos.04.01
[EOVERFLOW] [CX] The current value of the file position cannot be represented correctly in an object of type fpos_t.
- fgetpos.05
The fgetpos() function may fail if:
- fgetpos.05.01
[EBADF] [CX] The file descriptor underlying stream is not valid.
- fgetpos.05.02
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe, FIFO, or socket.
- [+]fgetpos64 (7 / 2 / 0)
- fgetpos64.01
The fgetpos() function shall store the current values of the parse state (if any) and file position indicator for the stream pointed to by stream in the object pointed to by pos.
- fgetpos64.02
The value stored contains unspecified information usable by fsetpos() for repositioning the stream to its position at the time of the call to fgetpos().
- fgetpos64.03.01
Upon successful completion, fgetpos() shall return 0;
- fgetpos64.03.02
otherwise, it shall return a non-zero value and set errno to indicate the error.
- fgetpos64.04
The fgetpos() function shall fail if:
- fgetpos64.04.01
[EOVERFLOW] [CX] The current value of the file position cannot be represented correctly in an object of type fpos_t.
- fgetpos64.05
The fgetpos() function may fail if:
- fgetpos64.05.01
[EBADF] [CX] The file descriptor underlying stream is not valid.
- fgetpos64.05.02
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe, FIFO, or socket.
- [+]fgets (14 / 5 / 0)
- fgets.01
The fgets() function shall read bytes from stream into the array pointed to by s, until n-1 bytes are read, or a <newline> is read and transferred to s, or an end-of-file condition is encountered.
- fgets.02
The string is then terminated with a null byte.
- fgets.03
The fgets() function may mark the st_atime field of the file associated with stream for update.
- fgets.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- fgets.05
Upon successful completion, fgets() shall return s.
- fgets.06
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgets() shall return a null pointer.
- fgets.07
If a read error occurs, the error indicator for the stream shall be set, fgets() shall return a null pointer, [CX] and shall set errno to indicate the error.
- fgets.08
The fgetc() function shall fail if data needs to be read and:
- fgets.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- fgets.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- fgets.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- fgets.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- fgets.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- fgets.09
The fgetc() function may fail if:
- fgets.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- fgets.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fgetwc_unlocked (19 / 4 / 0)
- fgetwc_unlocked.01
fgetwc_unlocked() is the same as fgetwc() except that it need not be thread safe. That is, it may only be invoked in the ways which are legal for getc_unlocked().
- fgetwc_unlocked.fgetwc.01.01
The fgetwc() function shall obtain the next character (if present) from the input stream pointed to by stream,
- fgetwc_unlocked.fgetwc.01.02
convert that to the corresponding wide-character code,
- fgetwc_unlocked.fgetwc.01.03
and advance the associated file position indicator for the stream (if defined).
- fgetwc_unlocked.fgetwc.02
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- fgetwc_unlocked.fgetwc.03
The fgetwc() function may mark the st_atime field of the file associated with stream for update.
- fgetwc_unlocked.fgetwc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- fgetwc_unlocked.fgetwc.05
Upon successful completion, the fgetwc() function shall return the wide-character code of the character read from the input stream pointed to by stream converted to a type wint_t.
- fgetwc_unlocked.fgetwc.06
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetwc() shall return WEOF.
- fgetwc_unlocked.fgetwc.07
If a read error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, [CX] and shall set errno to indicate the error.
- fgetwc_unlocked.fgetwc.08
If an encoding error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, and shall set errno to indicate the error.
- fgetwc_unlocked.fgetwc.09
The fgetwc() function shall fail if data needs to be read and:
- fgetwc_unlocked.fgetwc.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetwc() operation.
- fgetwc_unlocked.fgetwc.09.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- fgetwc_unlocked.fgetwc.09.03
[EILSEQ] The data obtained from the input stream does not form a valid character.
- fgetwc_unlocked.fgetwc.09.04
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- fgetwc_unlocked.fgetwc.09.05
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- fgetwc_unlocked.fgetwc.09.06
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- fgetwc_unlocked.fgetwc.10
The fgetwc() function may fail if:
- fgetwc_unlocked.fgetwc.10.01
[ENOMEM] [CX] Insufficient storage space is available.
- fgetwc_unlocked.fgetwc.10.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fileno (4 / 3 / 0)
- fileno.01
The fileno() function shall return the integer file descriptor associated with the stream pointed to by stream.
- fileno.02.01
Upon successful completion, fileno() shall return the integer value of the file descriptor associated with stream.
- fileno.02.02
Otherwise, the value -1 shall be returned and errno set to indicate the error.
- fileno.03
The fileno() function may fail if:
- fileno.03.01
[EBADF] The stream argument is not a valid stream.
- [+]fopen (42 / 9 / 0)
- fopen.01
The fopen() function shall open the file whose pathname is the string pointed to by filename, and associates a stream with it.
- fopen.02
The mode argument points to a string. If the string is one of the following, the file shall be opened in the indicated mode
- fopen.02.01
r or rb Open file for reading.
- fopen.02.02
w or wb Truncate to zero length or create file for writing.
- fopen.02.03
a or ab Append; open or create file for writing at end-of-file.
- fopen.02.04
r+ or rb+ or r+b Open file for update (reading and writing).
- fopen.02.05
w+ or wb+ or w+b Truncate to zero length or create file for update.
- fopen.02.06
a+ or ab+ or a+b Append; open or create file for update, writing at end-of-file.
- app.fopen.03
Otherwise, the behavior is undefined.
- fopen.04
The character 'b' shall have no effect, but is allowed for ISO C standard conformance.
- fopen.05
Opening a file with read mode (r as the first character in the mode argument) shall fail if the file does not exist or cannot be read.
- fopen.06
Opening a file with append mode (a as the first character in the mode argument) shall cause all subsequent writes to the file to be forced to the then current end-of-file, regardless of intervening calls to fseek().
- fopen.07
When a file is opened with update mode ( '+' as the second or third character in the mode argument), both input and output may be performed on the associated stream.
- fopen.08
However, the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function ( fseek(), fsetpos(), or rewind()), and input is not directly followed by output without an intervening call to a file positioning function, unless the input operation encounters end-of-file.
- fopen.09
When opened, a stream is fully buffered if and only if it can be determined not to refer to an interactive device.
- fopen.10
The error and end-of-file indicators for the stream shall be cleared.
- fopen.11
If mode is w, wb, a, ab, w+, wb+, w+b, a+, ab+, or a+b, and the file did not previously exist, upon successful completion, the fopen() function shall mark for update the st_atime, st_ctime, and st_mtime fields of the file and the st_ctime and st_mtime fields of the parent directory.
- fopen.11.01
If mode is w, wb, w+, wb+, or w+b, and the file did previously exist, upon successful completion, fopen() shall mark for update the st_ctime and st_mtime fields of the file.
- fopen.11.02
The fopen() function shall allocate a file descriptor as open() does.
- fopen.12.01
After a successful call to the fopen() function, the orientation of the stream shall be cleared,
- fopen.12.02
the encoding rule shall be cleared,
- fopen.12.03
and the associated mbstate_t object shall be set to describe an initial conversion state.
- fopen.13
The largest value that can be represented correctly in an object of type off_t shall be established as the offset maximum in the open file description.
- fopen.14.01
Upon successful completion, fopen() shall return a pointer to the object controlling the stream.
- fopen.14.02
Otherwise, a null pointer shall be returned, [CX] and errno shall be set to indicate the error.
- fopen.15
The fopen() function shall fail if:
- fopen.15.01
[EACCES] [CX] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by mode are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created.
- fopen.15.02
[EINTR] [CX] A signal was caught during fopen().
- fopen.15.03
[EISDIR] [CX] The named file is a directory and mode requires write access.
- fopen.15.04
[ELOOP] [CX] A loop exists in symbolic links encountered during resolution of the path argument.
- fopen.15.05
[EMFILE] [CX] {OPEN_MAX} file descriptors are currently open in the calling process.
- fopen.15.06
[ENAMETOOLONG] [CX]
The length of the filename argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- fopen.15.07
[ENFILE] [CX] The maximum allowable number of files is currently open in the system.
- fopen.15.08
[ENOENT] [CX] A component of filename does not name an existing file or filename is an empty string.
- fopen.15.09
[ENOSPC] [CX] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and the file was to be created.
- fopen.15.10
[ENOTDIR] [CX] A component of the path prefix is not a directory.
- fopen.15.11
[ENXIO] [CX] The named file is a character special or block special file, and the device associated with this special file does not exist.
- fopen.15.12
[EOVERFLOW] [CX] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- fopen.15.13
[EROFS] [CX] The named file resides on a read-only file system and mode requires write access.
- fopen.16
The fopen() function may fail if:
- fopen.16.01
[EINVAL] [CX] The value of the mode argument is not valid.
- fopen.16.02
[ELOOP] [CX] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- fopen.16.03
[EMFILE] [CX] {FOPEN_MAX} streams are currently open in the calling process.
- fopen.16.04
[EMFILE] [CX] {STREAM_MAX} streams are currently open in the calling process.
- fopen.16.05
[ENAMETOOLONG] [CX]
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- fopen.16.06
[ENOMEM] [CX] Insufficient storage space is available.
- fopen.16.07
[ETXTBSY] [CX] The file is a pure procedure (shared text) file that is being executed and mode requires write access.
- [+]fopen64 (42 / 9 / 0)
- fopen64.01
The fopen() function shall open the file whose pathname is the string pointed to by filename, and associates a stream with it.
- fopen64.02
The mode argument points to a string. If the string is one of the following, the file shall be opened in the indicated mode
- fopen64.02.01
r or rb Open file for reading.
- fopen64.02.02
w or wb Truncate to zero length or create file for writing.
- fopen64.02.03
a or ab Append; open or create file for writing at end-of-file.
- fopen64.02.04
r+ or rb+ or r+b Open file for update (reading and writing).
- fopen64.02.05
w+ or wb+ or w+b Truncate to zero length or create file for update.
- fopen64.02.06
a+ or ab+ or a+b Append; open or create file for update, writing at end-of-file.
- app.fopen64.03
Otherwise, the behavior is undefined.
- fopen64.04
The character 'b' shall have no effect, but is allowed for ISO C standard conformance.
- fopen64.05
Opening a file with read mode (r as the first character in the mode argument) shall fail if the file does not exist or cannot be read.
- fopen64.06
Opening a file with append mode (a as the first character in the mode argument) shall cause all subsequent writes to the file to be forced to the then current end-of-file, regardless of intervening calls to fseek().
- fopen64.07
When a file is opened with update mode ( '+' as the second or third character in the mode argument), both input and output may be performed on the associated stream.
- fopen64.08
However, the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function ( fseek(), fsetpos(), or rewind()), and input is not directly followed by output without an intervening call to a file positioning function, unless the input operation encounters end-of-file.
- fopen64.09
When opened, a stream is fully buffered if and only if it can be determined not to refer to an interactive device.
- fopen64.10
The error and end-of-file indicators for the stream shall be cleared.
- fopen64.11
If mode is w, wb, a, ab, w+, wb+, w+b, a+, ab+, or a+b, and the file did not previously exist, upon successful completion, the fopen() function shall mark for update the st_atime, st_ctime, and st_mtime fields of the file and the st_ctime and st_mtime fields of the parent directory.
- fopen64.11.01
If mode is w, wb, w+, wb+, or w+b, and the file did previously exist, upon successful completion, fopen() shall mark for update the st_ctime and st_mtime fields of the file.
- fopen64.11.02
The fopen() function shall allocate a file descriptor as open() does.
- fopen64.12.01
After a successful call to the fopen() function, the orientation of the stream shall be cleared,
- fopen64.12.02
the encoding rule shall be cleared,
- fopen64.12.03
and the associated mbstate_t object shall be set to describe an initial conversion state.
- fopen64.13
The largest value that can be represented correctly in an object of type off_t shall be established as the offset maximum in the open file description.
- fopen64.14.01
Upon successful completion, fopen() shall return a pointer to the object controlling the stream.
- fopen64.14.02
Otherwise, a null pointer shall be returned, [CX] and errno shall be set to indicate the error.
- fopen64.15
The fopen() function shall fail if:
- fopen64.15.01
[EACCES] [CX] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by mode are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created.
- fopen64.15.02
[EINTR] [CX] A signal was caught during fopen().
- fopen64.15.03
[EISDIR] [CX] The named file is a directory and mode requires write access.
- fopen64.15.04
[ELOOP] [CX] A loop exists in symbolic links encountered during resolution of the path argument.
- fopen64.15.05
[EMFILE] [CX] {OPEN_MAX} file descriptors are currently open in the calling process.
- fopen64.15.06
[ENAMETOOLONG] [CX]
The length of the filename argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- fopen64.15.07
[ENFILE] [CX] The maximum allowable number of files is currently open in the system.
- fopen64.15.08
[ENOENT] [CX] A component of filename does not name an existing file or filename is an empty string.
- fopen64.15.09
[ENOSPC] [CX] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and the file was to be created.
- fopen64.15.10
[ENOTDIR] [CX] A component of the path prefix is not a directory.
- fopen64.15.11
[ENXIO] [CX] The named file is a character special or block special file, and the device associated with this special file does not exist.
- fopen64.15.12
[EOVERFLOW] [CX] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- fopen64.15.13
[EROFS] [CX] The named file resides on a read-only file system and mode requires write access.
- fopen64.16
The fopen() function may fail if:
- fopen64.16.01
[EINVAL] [CX] The value of the mode argument is not valid.
- fopen64.16.02
[ELOOP] [CX] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- fopen64.16.03
[EMFILE] [CX] {FOPEN_MAX} streams are currently open in the calling process.
- fopen64.16.04
[EMFILE] [CX] {STREAM_MAX} streams are currently open in the calling process.
- fopen64.16.05
[ENAMETOOLONG] [CX]
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- fopen64.16.06
[ENOMEM] [CX] Insufficient storage space is available.
- fopen64.16.07
[ETXTBSY] [CX] The file is a pure procedure (shared text) file that is being executed and mode requires write access.
- [+]fputc (17 / 5 / 0)
- fputc.01.01
The fputc() function shall write the byte specified by c (converted to an unsigned char) to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- fputc.01.02
and shall advance the indicator appropriately.
- fputc.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the byte shall be appended to the output stream.
- fputc.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- fputc.04.01
Upon successful completion, fputc() shall return the value it has written.
- fputc.04.02
Otherwise, it shall return EOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- fputc.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- fputc.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fputc.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- fputc.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- fputc.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- fputc.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- fputc.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fputc.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fputc.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fputc.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fputc.06
The fputc() function may fail if:
- fputc.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- fputc.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fputs (16 / 4 / 0)
- fputs.01
The fputs() function shall write the null-terminated string pointed to by s to the stream pointed to by stream.
- fputs.02
The terminating null byte shall not be written.
- fputs.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputs() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- fputs.04.01
Upon successful completion, fputs() shall return a non-negative number.
- fputs.04.02
Otherwise, it shall return EOF, set an error indicator for the stream, [CX] and set errno to indicate the error.
- fputs.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- fputs.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fputs.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- fputs.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- fputs.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- fputs.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- fputs.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fputs.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fputs.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fputs.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fputs.06
The fputc() function may fail if:
- fputs.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- fputs.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fread (18 / 6 / 0)
- fread.01
The fread() function shall read into the array pointed to by ptr up to nitems elements whose size is specified by size in bytes, from the stream pointed to by stream.
- fread.02
For each object, size calls shall be made to the fgetc() function and the results stored, in the order read, in an array of unsigned char exactly overlaying the object.
- fread.03
The file position indicator for the stream (if defined) shall be advanced by the number of bytes successfully read.
- fread.04
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- fread.05
If a partial element is read, its value is unspecified.
- fread.06
The fread() function may mark the st_atime field of the file associated with stream for update.
- fread.07
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- fread.08.01
Upon successful completion, fread() shall return the number of elements successfully read
- fread.08.02
which is less than nitems only if a read error or end-of-file is encountered.
- fread.08.03
Otherwise, if a read error occurs, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- fread.09
If size or nitems is 0, fread() shall return 0 and the contents of the array and the state of the stream remain unchanged.
- fread.fgetc.08
The fgetc() function shall fail if data needs to be read and:
- fread.fgetc.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- fread.fgetc.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- fread.fgetc.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- fread.fgetc.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- fread.fgetc.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- fread.fgetc.09
The fgetc() function may fail if:
- fread.fgetc.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- fread.fgetc.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]freopen (36 / 5 / 0)
- freopen.01
The freopen() function shall first attempt to flush the stream and close any file descriptor associated with stream.
- freopen.02
Failure to flush or close the file descriptor successfully shall be ignored.
- freopen.03
The error and end-of-file indicators for the stream shall be cleared.
- freopen.04
The freopen() function shall open the file whose pathname is the string pointed to by filename and associate the stream pointed to by stream with it.
- freopen.05
The mode argument shall be used just as in fopen().
- freopen.06
The original stream shall be closed regardless of whether the subsequent open succeeds.
- freopen.07
If filename is a null pointer, the freopen() function shall attempt to change the mode of the stream to that specified by mode, as if the name of the file currently associated with the stream had been used.
- freopen.08
In this case, the file descriptor associated with the stream need not be closed if the call to freopen() succeeds.
- freopen.09
It is implementation-defined which changes of mode are permitted (if any), and under what circumstances.
- freopen.10.01
After a successful call to the freopen() function, the orientation of the stream shall be cleared,
- freopen.10.02
the encoding rule shall be cleared,
- freopen.10.03
and the associated mbstate_t object shall be set to describe an initial conversion state.
- freopen.11
The largest value that can be represented correctly in an object of type off_t shall be established as the offset maximum in the open file description.
- freopen.12.01
Upon successful completion, freopen() shall return the value of stream.
- freopen.12.02
Otherwise, a null pointer shall be returned, [CX] and errno shall be set to indicate the error.
- freopen.13
The freopen() function shall fail if:
- freopen.13.01
[EACCES] [CX] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by mode are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created.
- freopen.13.02
[EBADF] [CX] The file descriptor underlying the stream is not a valid file descriptor when filename is a null pointer.
- freopen.13.03
[EINTR] [CX] A signal was caught during freopen().
- freopen.13.04
[EISDIR] [CX] The named file is a directory and mode requires write access.
- freopen.13.05
[ELOOP] [CX] A loop exists in symbolic links encountered during resolution of the path argument.
- freopen.13.06
[EMFILE] [CX] {OPEN_MAX} file descriptors are currently open in the calling process.
- freopen.13.07
[ENAMETOOLONG] [CX]
The length of the filename argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- freopen.13.08
[ENFILE] [CX] The maximum allowable number of files is currently open in the system.
- freopen.13.09
[ENOENT] [CX] A component of filename does not name an existing file or filename is an empty string.
- freopen.13.10
[ENOSPC] [CX] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and it was to be created.
- freopen.13.11
[ENOTDIR] [CX] A component of the path prefix is not a directory.
- freopen.13.12
[ENXIO] [CX] The named file is a character special or block special file, and the device associated with this special file does not exist.
- freopen.13.13
[EOVERFLOW] [CX] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- freopen.13.14
[EROFS] [CX] The named file resides on a read-only file system and mode requires write access.
- freopen.14
The freopen() function may fail if:
- freopen.14.01
[EBADF] [CX] The mode with which the file descriptor underlying the stream was opened does not support the requested mode when filename is a null pointer.
- freopen.14.02
[EINVAL] [CX] The value of the mode argument is not valid.
- freopen.14.03
[ELOOP] [CX] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- freopen.14.04
[ENAMETOOLONG] [CX]
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- freopen.14.05
[ENOMEM] [CX] Insufficient storage space is available.
- freopen.14.06
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- freopen.14.07
[ETXTBSY] [CX] The file is a pure procedure (shared text) file that is being executed and mode requires write access.
- [+]freopen64 (36 / 4 / 0)
- freopen64.01
The freopen() function shall first attempt to flush the stream and close any file descriptor associated with stream.
- freopen64.02
Failure to flush or close the file descriptor successfully shall be ignored.
- freopen64.03
The error and end-of-file indicators for the stream shall be cleared.
- freopen64.04
The freopen() function shall open the file whose pathname is the string pointed to by filename and associate the stream pointed to by stream with it.
- freopen64.05
The mode argument shall be used just as in fopen().
- freopen64.06
The original stream shall be closed regardless of whether the subsequent open succeeds.
- freopen64.07
If filename is a null pointer, the freopen() function shall attempt to change the mode of the stream to that specified by mode, as if the name of the file currently associated with the stream had been used.
- freopen64.08
In this case, the file descriptor associated with the stream need not be closed if the call to freopen() succeeds.
- freopen64.09
It is implementation-defined which changes of mode are permitted (if any), and under what circumstances.
- freopen64.10.01
After a successful call to the freopen() function, the orientation of the stream shall be cleared,
- freopen64.10.02
the encoding rule shall be cleared,
- freopen64.10.03
and the associated mbstate_t object shall be set to describe an initial conversion state.
- freopen64.11
The largest value that can be represented correctly in an object of type off_t shall be established as the offset maximum in the open file description.
- freopen64.12.01
Upon successful completion, freopen() shall return the value of stream.
- freopen64.12.02
Otherwise, a null pointer shall be returned, [CX] and errno shall be set to indicate the error.
- freopen64.13
The freopen() function shall fail if:
- freopen64.13.01
[EACCES] [CX] Search permission is denied on a component of the path prefix, or the file exists and the permissions specified by mode are denied, or the file does not exist and write permission is denied for the parent directory of the file to be created.
- freopen64.13.02
[EBADF] [CX] The file descriptor underlying the stream is not a valid file descriptor when filename is a null pointer.
- freopen64.13.03
[EINTR] [CX] A signal was caught during freopen().
- freopen64.13.04
[EISDIR] [CX] The named file is a directory and mode requires write access.
- freopen64.13.05
[ELOOP] [CX] A loop exists in symbolic links encountered during resolution of the path argument.
- freopen64.13.06
[EMFILE] [CX] {OPEN_MAX} file descriptors are currently open in the calling process.
- freopen64.13.07
[ENAMETOOLONG] [CX]
The length of the filename argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- freopen64.13.08
[ENFILE] [CX] The maximum allowable number of files is currently open in the system.
- freopen64.13.09
[ENOENT] [CX] A component of filename does not name an existing file or filename is an empty string.
- freopen64.13.10
[ENOSPC] [CX] The directory or file system that would contain the new file cannot be expanded, the file does not exist, and it was to be created.
- freopen64.13.11
[ENOTDIR] [CX] A component of the path prefix is not a directory.
- freopen64.13.12
[ENXIO] [CX] The named file is a character special or block special file, and the device associated with this special file does not exist.
- freopen64.13.13
[EOVERFLOW] [CX] The named file is a regular file and the size of the file cannot be represented correctly in an object of type off_t.
- freopen64.13.14
[EROFS] [CX] The named file resides on a read-only file system and mode requires write access.
- freopen64.14.01
[EBADF] [CX] The mode with which the file descriptor underlying the stream was opened does not support the requested mode when filename is a null pointer.
- freopen64.14.02
[EINVAL] [CX] The value of the mode argument is not valid.
- freopen64.14.03
[ELOOP] [CX] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
- freopen64.14.04
[ENAMETOOLONG] [CX]
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- freopen64.14.05
[ENOMEM] [CX] Insufficient storage space is available.
- freopen64.14.06
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- freopen64.14.07
[ETXTBSY] [CX] The file is a pure procedure (shared text) file that is being executed and mode requires write access.
- [+]fseek (30 / 7 / 0)
- fseek.01
The fseek() function shall set the file-position indicator for the stream pointed to by stream.
- fseek.02
If a read or write error occurs, the error indicator for the stream shall be set and fseek() fails.
- fseek.03
The new position, measured in bytes from the beginning of the file, shall be obtained by adding offset to the position specified by whence.
- fseek.04
The specified point is the beginning of the file for SEEK_SET, the current value of the file-position indicator for SEEK_CUR, or end-of-file for SEEK_END.
- fseek.05
If the stream is to be used with wide-character input/output functions, the application shall ensure that offset is either 0 or a value returned by an earlier call to ftell() on the same stream and whence is SEEK_SET.
- fseek.06
A successful call to fseek() shall clear the end-of-file indicator for the stream and undo any effects of ungetc() and ungetwc() on the same stream.
- fseek.07
After an fseek() call, the next operation on an update stream may be either input or output.
- fseek.08
If the most recent operation, other than ftell(), on a given stream is fflush(), the file offset in the underlying open file description shall be adjusted to reflect the location specified by fseek().
- fseek.09
The fseek() function shall allow the file-position indicator to be set beyond the end of existing data in the file.
- fseek.10
If data is later written at this point, subsequent reads of data in the gap shall return bytes with the value 0 until data is actually written into the gap.
- fseek.11
The behavior of fseek() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- fseek.12.01
If the stream is writable and buffered data had not been written to the underlying file, fseek() shall cause the unwritten data to be written to the file
- fseek.12.02
and shall mark the st_ctime and st_mtime fields of the file for update.
- fseek.13
In a locale with state-dependent encoding, whether fseek() restores the stream's shift state is implementation-defined.
- fseek.14.01
The fseek() [CX] and fseeko() functions shall return 0 if they succeed.
- fseek.14.02
Otherwise, they shall return -1 and set errno to indicate the error.
- fseek.15
The fseek() [CX] and fseeko() functions shall fail if, [CX] either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fseek() or fseeko() causes an underlying lseek() or write() to be invoked, and:
- fseek.15.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write operation.
- fseek.15.02
[EBADF] [CX] The file descriptor underlying the stream file is not open for writing or the stream's buffer needed to be flushed and the file is not open.
- fseek.15.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fseek.15.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fseek.15.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fseek.15.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fseek.15.07
[EINVAL] [CX] The whence argument is invalid. The resulting file-position indicator would be set to a negative value.
- fseek.15.08
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write() to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fseek.15.09
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fseek.15.10
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- fseek.15.11
[EOVERFLOW] [CX] For fseek(), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
- fseek.15.12
[EOVERFLOW] [CX] For fseeko(), the resulting file offset would be a value which cannot be represented correctly in an object of type off_t.
- fseek.15.13
[EPIPE] [CX] An attempt was made to write to a pipe or FIFO that is not open for reading by any process; a SIGPIPE signal shall also be sent to the thread.
- fseek.15.14
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- [+]fseeko (31 / 7 / 0)
- fseeko.01
The fseek() function shall set the file-position indicator for the stream pointed to by stream.
- fseeko.02
If a read or write error occurs, the error indicator for the stream shall be set and fseek() fails.
- fseeko.03
The new position, measured in bytes from the beginning of the file, shall be obtained by adding offset to the position specified by whence.
- fseeko.04
The specified point is the beginning of the file for SEEK_SET, the current value of the file-position indicator for SEEK_CUR, or end-of-file for SEEK_END.
- fseeko.05
If the stream is to be used with wide-character input/output functions, the application shall ensure that offset is either 0 or a value returned by an earlier call to ftell() on the same stream and whence is SEEK_SET.
- fseeko.06
A successful call to fseek() shall clear the end-of-file indicator for the stream and undo any effects of ungetc() and ungetwc() on the same stream.
- fseeko.07
After an fseek() call, the next operation on an update stream may be either input or output.
- fseeko.08
If the most recent operation, other than ftell(), on a given stream is fflush(), the file offset in the underlying open file description shall be adjusted to reflect the location specified by fseek().
- fseeko.09
The fseek() function shall allow the file-position indicator to be set beyond the end of existing data in the file.
- fseeko.10
If data is later written at this point, subsequent reads of data in the gap shall return bytes with the value 0 until data is actually written into the gap.
- fseeko.11
The behavior of fseek() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- fseeko.12.01
If the stream is writable and buffered data had not been written to the underlying file, fseek() shall cause the unwritten data to be written to the file
- fseeko.12.02
and shall mark the st_ctime and st_mtime fields of the file for update.
- fseeko.13
In a locale with state-dependent encoding, whether fseek() restores the stream's shift state is implementation-defined.
- fseeko.14.01
The fseek() [CX] and fseeko() functions shall return 0 if they succeed.
- fseeko.14.02
Otherwise, they shall return -1 and set errno to indicate the error.
- fseeko.15
The fseek() [CX] and fseeko() functions shall fail if, [CX] either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fseek() or fseeko() causes an underlying lseek() or write() to be invoked, and:
- fseeko.15.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write operation.
- fseeko.15.02
[EBADF] [CX] The file descriptor underlying the stream file is not open for writing or the stream's buffer needed to be flushed and the file is not open.
- fseeko.15.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fseeko.15.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fseeko.15.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fseeko.15.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fseeko.15.07
[EINVAL] [CX] The whence argument is invalid. The resulting file-position indicator would be set to a negative value.
- fseeko.15.08
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write() to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fseeko.15.09
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fseeko.15.10
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- fseeko.15.11
[EOVERFLOW] [CX] For fseek(), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
- fseeko.15.12
[EOVERFLOW] [CX] For fseeko(), the resulting file offset would be a value which cannot be represented correctly in an object of type off_t.
- fseeko.15.13
[EPIPE] [CX] An attempt was made to write to a pipe or FIFO that is not open for reading by any process; a SIGPIPE signal shall also be sent to the thread.
- fseeko.15.14
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- fseeko.16
The fseeko() function shall be equivalent to the fseek() function except that the offset argument is of type off_t.
Generalizes:
- fseeko.01
- fseeko.02
- fseeko.03
- fseeko.04
- fseeko.05
- fseeko.06
- fseeko.07
- fseeko.08
- fseeko.09
- fseeko.10
- fseeko.11
- fseeko.12.01
- fseeko.12.02
- fseeko.13
- fseeko.14.01
- fseeko.14.02
- fseeko.15.01
- fseeko.15.02
- fseeko.15.03
- fseeko.15.04
- fseeko.15.05
- fseeko.15.06
- fseeko.15.07
- fseeko.15.08
- fseeko.15.09
- fseeko.15.10
- fseeko.15.11
- fseeko.15.12
- fseeko.15.13
- fseeko.15.14
- [+]fseeko64 (31 / 7 / 0)
- fseeko64.01
The fseek() function shall set the file-position indicator for the stream pointed to by stream.
- fseeko64.02
If a read or write error occurs, the error indicator for the stream shall be set and fseek() fails.
- fseeko64.03
The new position, measured in bytes from the beginning of the file, shall be obtained by adding offset to the position specified by whence.
- fseeko64.04
The specified point is the beginning of the file for SEEK_SET, the current value of the file-position indicator for SEEK_CUR, or end-of-file for SEEK_END.
- fseeko64.05
If the stream is to be used with wide-character input/output functions, the application shall ensure that offset is either 0 or a value returned by an earlier call to ftell() on the same stream and whence is SEEK_SET.
- fseeko64.06
A successful call to fseek() shall clear the end-of-file indicator for the stream and undo any effects of ungetc() and ungetwc() on the same stream.
- fseeko64.07
After an fseek() call, the next operation on an update stream may be either input or output.
- fseeko64.08
If the most recent operation, other than ftell(), on a given stream is fflush(), the file offset in the underlying open file description shall be adjusted to reflect the location specified by fseek().
- fseeko64.09
The fseek() function shall allow the file-position indicator to be set beyond the end of existing data in the file.
- fseeko64.10
If data is later written at this point, subsequent reads of data in the gap shall return bytes with the value 0 until data is actually written into the gap.
- fseeko64.11
The behavior of fseek() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- fseeko64.12.01
If the stream is writable and buffered data had not been written to the underlying file, fseek() shall cause the unwritten data to be written to the file
- fseeko64.12.02
and shall mark the st_ctime and st_mtime fields of the file for update.
- fseeko64.13
In a locale with state-dependent encoding, whether fseek() restores the stream's shift state is implementation-defined.
- fseeko64.14.01
The fseek() [CX] and fseeko() functions shall return 0 if they succeed.
- fseeko64.14.02
Otherwise, they shall return -1 and set errno to indicate the error.
- fseeko64.15
The fseek() [CX] and fseeko() functions shall fail if, [CX] either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fseek() or fseeko() causes an underlying lseek() or write() to be invoked, and:
- fseeko64.15.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write operation.
- fseeko64.15.02
[EBADF] [CX] The file descriptor underlying the stream file is not open for writing or the stream's buffer needed to be flushed and the file is not open.
- fseeko64.15.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fseeko64.15.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fseeko64.15.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fseeko64.15.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fseeko64.15.07
[EINVAL] [CX] The whence argument is invalid. The resulting file-position indicator would be set to a negative value.
- fseeko64.15.08
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write() to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fseeko64.15.09
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fseeko64.15.10
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- fseeko64.15.11
[EOVERFLOW] [CX] For fseek(), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
- fseeko64.15.12
[EOVERFLOW] [CX] For fseeko(), the resulting file offset would be a value which cannot be represented correctly in an object of type off_t.
- fseeko64.15.13
[EPIPE] [CX] An attempt was made to write to a pipe or FIFO that is not open for reading by any process; a SIGPIPE signal shall also be sent to the thread.
- fseeko64.15.14
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- fseeko64.16
The fseeko() function shall be equivalent to the fseek() function except that the offset argument is of type off_t.
Generalizes:
- fseeko64.01
- fseeko64.02
- fseeko64.03
- fseeko64.04
- fseeko64.05
- fseeko64.06
- fseeko64.07
- fseeko64.08
- fseeko64.09
- fseeko64.10
- fseeko64.11
- fseeko64.12.01
- fseeko64.12.02
- fseeko64.13
- fseeko64.14.01
- fseeko64.14.02
- fseeko64.15.01
- fseeko64.15.02
- fseeko64.15.03
- fseeko64.15.04
- fseeko64.15.05
- fseeko64.15.06
- fseeko64.15.07
- fseeko64.15.08
- fseeko64.15.09
- fseeko64.15.10
- fseeko64.15.11
- fseeko64.15.12
- fseeko64.15.13
- fseeko64.15.14
- [+]fsetpos (17 / 2 / 0)
- fsetpos.01
The fsetpos() function shall set the file position and state indicators for the stream pointed to by stream according to the value of the object pointed to by pos, which the application shall ensure is a value obtained from an earlier call to fgetpos() on the same stream.
- fsetpos.02
If a read or write error occurs, the error indicator for the stream shall be set and fsetpos() fails.
- fsetpos.03
A successful call to the fsetpos() function shall clear the end-of-file indicator for the stream and undo any effects of ungetc() on the same stream.
- fsetpos.04
After an fsetpos() call, the next operation on an update stream may be either input or output.
- app.fsetpos.05
The behavior of fsetpos() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- fsetpos.06.01
The fsetpos() function shall return 0 if it succeeds;
- fsetpos.06.02
otherwise, it shall return a non-zero value and set errno to indicate the error.
- fsetpos.07
The fsetpos() function shall fail if, [CX] either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fsetpos() causes an underlying lseek() or write() to be invoked, and:
- fsetpos.07.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write operation.
- fsetpos.07.02
[EBADF] [CX] The file descriptor underlying the stream file is not open for writing or the stream's buffer needed to be flushed and the file is not open.
- fsetpos.07.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fsetpos.07.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fsetpos.07.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fsetpos.07.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fsetpos.07.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write() to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fsetpos.07.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fsetpos.07.09
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- fsetpos.07.10
[EPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- fsetpos.07.11
[EPIPE] [CX] An attempt was made to write to a pipe or FIFO that is not open for reading by any process; a SIGPIPE signal shall also be sent to the thread.
- [+]fsetpos64 (17 / 2 / 0)
- fsetpos64.01
The fsetpos() function shall set the file position and state indicators for the stream pointed to by stream according to the value of the object pointed to by pos, which the application shall ensure is a value obtained from an earlier call to fgetpos() on the same stream.
- fsetpos64.02
If a read or write error occurs, the error indicator for the stream shall be set and fsetpos() fails.
- fsetpos64.03
A successful call to the fsetpos() function shall clear the end-of-file indicator for the stream and undo any effects of ungetc() on the same stream.
- fsetpos64.04
After an fsetpos() call, the next operation on an update stream may be either input or output.
- app.fsetpos64.05
The behavior of fsetpos() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- fsetpos64.06.01
The fsetpos() function shall return 0 if it succeeds;
- fsetpos64.06.02
otherwise, it shall return a non-zero value and set errno to indicate the error.
- fsetpos64.07
The fsetpos() function shall fail if, [CX] either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fsetpos() causes an underlying lseek() or write() to be invoked, and:
- fsetpos64.07.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write operation.
- fsetpos64.07.02
[EBADF] [CX] The file descriptor underlying the stream file is not open for writing or the stream's buffer needed to be flushed and the file is not open.
- fsetpos64.07.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- fsetpos64.07.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- fsetpos64.07.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fsetpos64.07.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fsetpos64.07.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write() to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fsetpos64.07.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fsetpos64.07.09
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- fsetpos64.07.10
[EPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- fsetpos64.07.11
[EPIPE] [CX] An attempt was made to write to a pipe or FIFO that is not open for reading by any process; a SIGPIPE signal shall also be sent to the thread.
- [+]ftell (9 / 4 / 0)
- ftell.01
The ftell() function shall obtain the current value of the file-position indicator for the stream pointed to by stream.
- ftell.02
The ftello() function shall be equivalent to ftell(), except that the return value is of type off_t.
- ftell.03.01
Upon successful completion, ftell() [CX] and ftello() shall return the current value of the file-position indicator for the stream measured in bytes from the beginning of the file.
- ftell.03.02
Otherwise, ftell() [CX] and ftello() shall return -1, cast to long and off_t respectively, and set errno to indicate the error.
- ftell.04
The ftell() [CX] and ftello() functions shall fail if:
- ftell.04.01
[EBADF] [CX] The file descriptor underlying stream is not an open file descriptor.
- ftell.04.02
[EOVERFLOW] [CX] For ftell(), the current file offset cannot be represented correctly in an object of type long.
- ftell.04.03
[EOVERFLOW] [CX] For ftello(), the current file offset cannot be represented correctly in an object of type off_t.
- ftell.04.04
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- ftell.05
The ftell() function may fail if:
- ftell.05.01
[ESPIPE] [CX] The file descriptor underlying stream is associated with a socket.
- [+]ftello (9 / 4 / 0)
- ftello.01
The ftell() function shall obtain the current value of the file-position indicator for the stream pointed to by stream.
- ftello.02
The ftello() function shall be equivalent to ftell(), except that the return value is of type off_t.
- ftello.03.01
Upon successful completion, ftell() [CX] and ftello() shall return the current value of the file-position indicator for the stream measured in bytes from the beginning of the file.
- ftello.03.02
Otherwise, ftell() [CX] and ftello() shall return -1, cast to long and off_t respectively, and set errno to indicate the error.
- ftello.04
The ftell() [CX] and ftello() functions shall fail if:
- ftello.04.01
[EBADF] [CX] The file descriptor underlying stream is not an open file descriptor.
- ftello.04.02
[EOVERFLOW] [CX] For ftell(), the current file offset cannot be represented correctly in an object of type long.
- ftello.04.03
[EOVERFLOW] [CX] For ftello(), the current file offset cannot be represented correctly in an object of type off_t.
- ftello.04.04
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- ftello.05
The ftell() function may fail if:
- ftello.05.01
[ESPIPE] [CX] The file descriptor underlying stream is associated with a socket.
- [+]ftello64 (9 / 4 / 0)
- ftello64.ftell.01
The ftell() function shall obtain the current value of the file-position indicator for the stream pointed to by stream.
- ftello64.ftell.02
The ftello() function shall be equivalent to ftell(), except that the return value is of type off_t.
- ftello64.ftell.03.01
Upon successful completion, ftell() [CX] and ftello() shall return the current value of the file-position indicator for the stream measured in bytes from the beginning of the file.
- ftello64.ftell.03.02
Otherwise, ftell() [CX] and ftello() shall return -1, cast to long and off_t respectively, and set errno to indicate the error.
- ftello64.ftell.04
The ftell() [CX] and ftello() functions shall fail if:
- ftello64.ftell.04.01
[EBADF] [CX] The file descriptor underlying stream is not an open file descriptor.
- ftello64.ftell.04.02
[EOVERFLOW] [CX] For ftell(), the current file offset cannot be represented correctly in an object of type long.
- ftello64.ftell.04.03
[EOVERFLOW] [CX] For ftello(), the current file offset cannot be represented correctly in an object of type off_t.
- ftello64.ftell.04.04
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- ftello64.ftell.05
The ftell() function may fail if:
- ftello64.ftell.05.01
[ESPIPE] [CX] The file descriptor underlying stream is associated with a socket.
- [+]fwrite (20 / 4 / 0)
- fwrite.01
The fwrite() function shall write, from the array pointed to by ptr, up to nitems elements whose size is specified by size, to the stream pointed to by stream.
- fwrite.02
For each object, size calls shall be made to the fputc() function, taking the values (in order) from an array of unsigned char exactly overlaying the object.
- fwrite.03
The file-position indicator for the stream (if defined) shall be advanced by the number of bytes successfully written.
- fwrite.04
If an error occurs, the resulting value of the file-position indicator for the stream is unspecified.
- fwrite.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- fwrite.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fwrite.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- fwrite.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- fwrite.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- fwrite.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- fwrite.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fwrite.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fwrite.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fwrite.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fwrite.06
The fputc() function may fail if:
- fwrite.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- fwrite.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- fwrite.07
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fwrite() and the next successful completion of a call to fflush() or fclose() on the same stream, or a call to exit() or abort().
- fwrite.08.01
The fwrite() function shall return the number of elements successfully written,
- fwrite.08.02
which may be less than nitems if a write error is encountered.
- fwrite.09
If size or nitems is 0, fwrite() shall return 0 and the state of the stream remains unchanged.
- fwrite.10
Otherwise, if a write error occurs, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- [+]getc (16 / 8 / 0)
- getc.01
The getc() function shall be equivalent to fgetc() , except that if it is implemented as a macro it may evaluate stream more than once, so the argument should never be an expression with side effects.
- getc.fgetc.01.01
If the end-of-file indicator for the input stream pointed to by stream is not set and a next byte is present, the fgetc() function shall obtain the next byte as an unsigned char converted to an int, from the input stream pointed to by stream
- getc.fgetc.01.02
and advance the associated file position indicator for the stream (if defined).
- getc.fgetc.02
Since fgetc() operates on bytes, reading a character consisting of multiple bytes (or "a multi-byte character") may require multiple calls to fgetc().
- getc.fgetc.03
The fgetc() function may mark the st_atime field of the file associated with stream for update.
- getc.fgetc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getc.fgetc.05
Upon successful completion, fgetc() shall return the next byte from the input stream pointed to by stream.
- getc.fgetc.06
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetc() shall return EOF.
- getc.fgetc.07
If a read error occurs, the error indicator for the stream shall be set, fgetc() shall return EOF, [CX] and shall set errno to indicate the error.
- getc.fgetc.08
The fgetc() function shall fail if data needs to be read and:
- getc.fgetc.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- getc.fgetc.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getc.fgetc.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getc.fgetc.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getc.fgetc.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getc.fgetc.09
The fgetc() function may fail if:
- getc.fgetc.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- getc.fgetc.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]getc_unlocked (15 / 8 / 0)
- getc_unlocked.fgetc.01.01
If the end-of-file indicator for the input stream pointed to by stream is not set and a next byte is present, the fgetc() function shall obtain the next byte as an unsigned char converted to an int, from the input stream pointed to by stream
- getc_unlocked.fgetc.01.02
and advance the associated file position indicator for the stream (if defined).
- getc_unlocked.fgetc.02
Since fgetc() operates on bytes, reading a character consisting of multiple bytes (or "a multi-byte character") may require multiple calls to fgetc().
- getc_unlocked.fgetc.03
The fgetc() function may mark the st_atime field of the file associated with stream for update.
- getc_unlocked.fgetc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getc_unlocked.fgetc.05
Upon successful completion, fgetc() shall return the next byte from the input stream pointed to by stream.
- getc_unlocked.fgetc.06
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetc() shall return EOF.
- getc_unlocked.fgetc.07
If a read error occurs, the error indicator for the stream shall be set, fgetc() shall return EOF, [CX] and shall set errno to indicate the error.
- getc_unlocked.fgetc.08
The fgetc() function shall fail if data needs to be read and:
- getc_unlocked.fgetc.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- getc_unlocked.fgetc.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getc_unlocked.fgetc.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getc_unlocked.fgetc.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getc_unlocked.fgetc.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getc_unlocked.fgetc.09
The fgetc() function may fail if:
- getc_unlocked.fgetc.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- getc_unlocked.fgetc.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]getchar (16 / 8 / 0)
- getchar.01
The getchar() function shall be equivalent to getc(stdin).
- getchar.fgetc.01.01
If the end-of-file indicator for the input stream pointed to by stream is not set and a next byte is present, the fgetc() function shall obtain the next byte as an unsigned char converted to an int, from the input stream pointed to by stream
- getchar.fgetc.01.02
and advance the associated file position indicator for the stream (if defined).
- getchar.fgetc.02
Since fgetc() operates on bytes, reading a character consisting of multiple bytes (or "a multi-byte character") may require multiple calls to fgetc().
- getchar.fgetc.03
The fgetc() function may mark the st_atime field of the file associated with stream for update.
- getchar.fgetc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getchar.fgetc.05
Upon successful completion, fgetc() shall return the next byte from the input stream pointed to by stream.
- getchar.fgetc.06
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetc() shall return EOF.
- getchar.fgetc.07
If a read error occurs, the error indicator for the stream shall be set, fgetc() shall return EOF, [CX] and shall set errno to indicate the error.
- getchar.fgetc.08
The fgetc() function shall fail if data needs to be read and:
- getchar.fgetc.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- getchar.fgetc.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getchar.fgetc.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getchar.fgetc.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getchar.fgetc.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getchar.fgetc.09
The fgetc() function may fail if:
- getchar.fgetc.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- getchar.fgetc.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]getchar_unlocked (15 / 8 / 0)
- getchar_unlocked.fgetc.01.01
If the end-of-file indicator for the input stream pointed to by stream is not set and a next byte is present, the fgetc() function shall obtain the next byte as an unsigned char converted to an int, from the input stream pointed to by stream
- getchar_unlocked.fgetc.01.02
and advance the associated file position indicator for the stream (if defined).
- getchar_unlocked.fgetc.02
Since fgetc() operates on bytes, reading a character consisting of multiple bytes (or "a multi-byte character") may require multiple calls to fgetc().
- getchar_unlocked.fgetc.03
The fgetc() function may mark the st_atime field of the file associated with stream for update.
- getchar_unlocked.fgetc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getchar_unlocked.fgetc.05
Upon successful completion, fgetc() shall return the next byte from the input stream pointed to by stream.
- getchar_unlocked.fgetc.06
If the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetc() shall return EOF.
- getchar_unlocked.fgetc.07
If a read error occurs, the error indicator for the stream shall be set, fgetc() shall return EOF, [CX] and shall set errno to indicate the error.
- getchar_unlocked.fgetc.08
The fgetc() function shall fail if data needs to be read and:
- getchar_unlocked.fgetc.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- getchar_unlocked.fgetc.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getchar_unlocked.fgetc.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getchar_unlocked.fgetc.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getchar_unlocked.fgetc.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getchar_unlocked.fgetc.09
The fgetc() function may fail if:
- getchar_unlocked.fgetc.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- getchar_unlocked.fgetc.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]getw (14 / 6 / 0)
- getw.01
The getw() function reads the next word from the stream.
- getw.02
he size of a word is the size of an int and may vary from machine to machine.
- getw.03
The getw() function presumes no special alignment in the file.
- getw.04
The getw() function may mark the st_atime field of the file associated with stream for update. The st_atime field will be marked for update by the first successful execution of fgetc(), fgets(), fread(), getc(), getchar(), gets(), fscanf() or scanf() using stream that returns data not supplied by a prior call to ungetc().
- getw.05.01
Upon successful completion, getw() returns the next word from the input stream pointed to by stream.
- getw.05.02
If the stream is at end-of-file, the end-of-file indicator for the stream is set and getw() returns EOF
- getw.05.03
.If a read error occurs, the error indicator for the stream is set, getw() returns EOF and sets errno to indicate the error.
- getw.08
The fgetc() function shall fail if data needs to be read and:
- getw.08.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetc() operation.
- getw.08.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getw.08.03
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getw.08.04
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getw.08.05
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getw.09
The fgetc() function may fail if:
- getw.09.01
[ENOMEM] [CX] Insufficient storage space is available.
- getw.09.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putc (17 / 5 / 0)
- putc.01
The putc() function shall be equivalent to fputc(), except that if it is implemented as a macro it may evaluate stream more than once, so the argument should never be an expression with side effects.
- putc.01.01
The fputc() function shall write the byte specified by c (converted to an unsigned char) to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- putc.01.02
and shall advance the indicator appropriately.
- putc.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the byte shall be appended to the output stream.
- putc.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putc.04.01
Upon successful completion, fputc() shall return the value it has written.
- putc.04.02
Otherwise, it shall return EOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- putc.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- putc.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putc.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putc.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- putc.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- putc.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- putc.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putc.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putc.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putc.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putc.06
The fputc() function may fail if:
- putc.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- putc.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putc_unlocked (17 / 5 / 0)
- putc_unlocked.01.01
The fputc() function shall write the byte specified by c (converted to an unsigned char) to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- putc_unlocked.01.02
and shall advance the indicator appropriately.
- putc_unlocked.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the byte shall be appended to the output stream.
- putc_unlocked.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putc_unlocked.04.01
Upon successful completion, fputc() shall return the value it has written.
- putc_unlocked.04.02
Otherwise, it shall return EOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- putc_unlocked.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- putc_unlocked.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putc_unlocked.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putc_unlocked.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- putc_unlocked.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- putc_unlocked.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- putc_unlocked.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putc_unlocked.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putc_unlocked.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putc_unlocked.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putc_unlocked.06
The fputc() function may fail if:
- putc_unlocked.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- putc_unlocked.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putchar (17 / 5 / 0)
- putchar.01
The function call putchar(c) shall be equivalent to putc(c,stdout).
- putchar.01.01
The fputc() function shall write the byte specified by c (converted to an unsigned char) to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- putchar.01.02
and shall advance the indicator appropriately.
- putchar.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the byte shall be appended to the output stream.
- putchar.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putchar.04.01
Upon successful completion, fputc() shall return the value it has written.
- putchar.04.02
Otherwise, it shall return EOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- putchar.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- putchar.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putchar.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putchar.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- putchar.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- putchar.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- putchar.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putchar.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putchar.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putchar.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putchar.06
The fputc() function may fail if:
- putchar.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- putchar.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putchar_unlocked (17 / 5 / 0)
- putchar_unlocked.01.01
The fputc() function shall write the byte specified by c (converted to an unsigned char) to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- putchar_unlocked.01.02
and shall advance the indicator appropriately.
- putchar_unlocked.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the byte shall be appended to the output stream.
- putchar_unlocked.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putchar_unlocked.04.01
Upon successful completion, fputc() shall return the value it has written.
- putchar_unlocked.04.02
Otherwise, it shall return EOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- putchar_unlocked.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- putchar_unlocked.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putchar_unlocked.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putchar_unlocked.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- putchar_unlocked.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- putchar_unlocked.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- putchar_unlocked.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putchar_unlocked.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putchar_unlocked.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putchar_unlocked.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putchar_unlocked.06
The fputc() function may fail if:
- putchar_unlocked.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- putchar_unlocked.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]puts (16 / 2 / 0)
- puts.01
The puts() function shall write the string pointed to by s, followed by a <newline>, to the standard output stream stdout.
- puts.02
The terminating null byte shall not be written.
- puts.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of puts() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- puts.04.01
Upon successful completion, puts() shall return a non-negative number.
- puts.04.02
Otherwise, it shall return EOF, shall set an error indicator for the stream, [CX] and errno shall be set to indicate the error.
- puts.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- puts.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- puts.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- puts.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- puts.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- puts.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- puts.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- puts.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- puts.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- puts.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- puts.06
The fputc() function may fail if:
- puts.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- puts.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putw (17 / 3 / 0)
- putw.01
The putw() function writes the word (that is, type int) w to the output stream (at the position at which the file offset, if defined, is pointing).
- putw.02
The size of a word is the size of a type int and varies from machine to machine.
- putw.03
The putw() function neither assumes nor causes special alignment in the file.
- putw.04
The st_ctime and st_mtime fields of the file will be marked for update between the successful execution of putw() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putw.05.01
Upon successful completion, putw() returns 0.
- putw.05.02
Otherwise, a non-zero value is returned, the error indicators for the stream are set, and errno is set to indicate the error.
- putw.fputc.05
The fputc() function shall fail if either the stream is unbuffered or the stream's buffer needs to be flushed, and:
- putw.fputc.05.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putw.fputc.05.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putw.fputc.05.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size.
- putw.fputc.05.04
[EFBIG] [XSI] An attempt was made to write to a file that exceeds the process' file size limit.
- putw.fputc.05.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum.
- putw.fputc.05.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putw.fputc.05.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putw.fputc.05.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putw.fputc.05.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putw.fputc.06
The fputc() function may fail if:
- putw.fputc.06.01
[ENOMEM] [CX] Insufficient storage space is available.
- putw.fputc.06.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]rewind (28 / 4 / 0)
- rewind.01
The call:rewind(stream)shall be equivalent to:(void) fseek(stream, 0L, SEEK_SET)
- rewind.02
rewind() shall also clear the error indicator.
- rewind.03
Since rewind() does not return a value, an application wishing to detect errors should clear errno, then call rewind(), and if errno is non-zero, assume an error has occurred.
- rewind.fseek.01
The fseek() function shall set the file-position indicator for the stream pointed to by stream.
- rewind.fseek.02
If a read or write error occurs, the error indicator for the stream shall be set and fseek() fails.
- rewind.fseek.03
The new position, measured in bytes from the beginning of the file, shall be obtained by adding offset to the position specified by whence.
- rewind.fseek.04
The specified point is the beginning of the file for SEEK_SET, the current value of the file-position indicator for SEEK_CUR, or end-of-file for SEEK_END.
- rewind.fseek.05
If the stream is to be used with wide-character input/output functions, the application shall ensure that offset is either 0 or a value returned by an earlier call to ftell() on the same stream and whence is SEEK_SET.
- rewind.fseek.06
A successful call to fseek() shall clear the end-of-file indicator for the stream and undo any effects of ungetc() and ungetwc() on the same stream.
- rewind.fseek.07
After an fseek() call, the next operation on an update stream may be either input or output.
- rewind.fseek.08
If the most recent operation, other than ftell(), on a given stream is fflush(), the file offset in the underlying open file description shall be adjusted to reflect the location specified by fseek().
- rewind.fseek.11
The behavior of fseek() on devices which are incapable of seeking is implementation-defined. The value of the file offset associated with such a device is undefined.
- rewind.fseek.12.01
If the stream is writable and buffered data had not been written to the underlying file, fseek() shall cause the unwritten data to be written to the file
- rewind.fseek.12.02
and shall mark the st_ctime and st_mtime fields of the file for update.
- rewind.fseek.13
In a locale with state-dependent encoding, whether fseek() restores the stream's shift state is implementation-defined.
- rewind.fseek.15
The fseek() [CX] and fseeko() functions shall fail if, [CX] either the stream is unbuffered or the stream's buffer needed to be flushed, and the call to fseek() or fseeko() causes an underlying lseek() or write() to be invoked, and:
- rewind.fseek.15.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor and the thread would be delayed in the write operation.
- rewind.fseek.15.02
[EBADF] [CX] The file descriptor underlying the stream file is not open for writing or the stream's buffer needed to be flushed and the file is not open.
- rewind.fseek.15.03
[EFBIG] [CX] An attempt was made to write a file that exceeds the maximum file size.
- rewind.fseek.15.04
[EFBIG] [XSI] An attempt was made to write a file that exceeds the process' file size limit.
- rewind.fseek.15.05
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- rewind.fseek.15.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- rewind.fseek.15.08
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to perform a write() to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- rewind.fseek.15.09
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- rewind.fseek.15.10
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- rewind.fseek.15.11
[EOVERFLOW] [CX] For fseek(), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
- rewind.fseek.15.12
[EOVERFLOW] [CX] For fseeko(), the resulting file offset would be a value which cannot be represented correctly in an object of type off_t.
- rewind.fseek.15.13
[EPIPE] [CX] An attempt was made to write to a pipe or FIFO that is not open for reading by any process; a SIGPIPE signal shall also be sent to the thread.
- rewind.fseek.15.14
[ESPIPE] [CX] The file descriptor underlying stream is associated with a pipe or FIFO.
- [+]ungetc (13 / 1 / 0)
- ungetc.01
The ungetc() function shall push the byte specified by c (converted to an unsigned char) back onto the input stream pointed to by stream.
- ungetc.02
The pushed-back bytes shall be returned by subsequent reads on that stream in the reverse order of their pushing.
- ungetc.03
A successful intervening call (with the stream pointed to by stream) to a file-positioning function ( fseek(), fsetpos(), or rewind()) shall discard any pushed-back bytes for the stream.
- ungetc.04
The external storage corresponding to the stream shall be unchanged.
- ungetc.05.01
One byte of push-back shall be provided.
- ungetc.05.02
If ungetc() is called too many times on the same stream without an intervening read or file-positioning operation on that stream, the operation may fail.
- ungetc.06
If the value of c equals that of the macro EOF, the operation shall fail and the input stream shall be left unchanged.
- ungetc.07
A successful call to ungetc() shall clear the end-of-file indicator for the stream.
- ungetc.08
The value of the file-position indicator for the stream after reading or discarding all pushed-back bytes shall be the same as it was before the bytes were pushed back.
- ungetc.09.01
The file-position indicator is decremented by each successful call to ungetc();
- ungetc.09.02
if its value was 0 before a call, its value is unspecified after the call.
- ungetc.10.01
Upon successful completion, ungetc() shall return the byte pushed back after conversion.
- ungetc.10.02
Otherwise, it shall return EOF.
- [+]io.fstream.lock (30 / 18 / 0)
- [+]flockfile (10 / 6 / 0)
- flockfile.01
These functions shall provide for explicit application-level locking of stdio ( FILE *) objects. These functions can be used by a thread to delineate a sequence of I/O statements that are executed as a unit.
- flockfile.02
The flockfile() function shall acquire for a thread ownership of a ( FILE *) object.
- flockfile.04
The functions shall behave as if there is a lock count associated with each ( FILE *) object.
- flockfile.05
This count is implicitly initialized to zero when the ( FILE *) object is created.
- flockfile.06
The ( FILE *) object is unlocked when the count is zero.
- flockfile.07
When the count is positive, a single thread owns the ( FILE *) object.
- flockfile.08.01
When the flockfile() function is called, if the count is zero or if the count is positive and the caller owns the ( FILE *) object, the count shall be incremented.
- flockfile.08.02
Otherwise, the calling thread shall be suspended, waiting for the count to return to zero.
- flockfile.09
This allows matching calls to flockfile() (or successful calls to ftrylockfile()) and funlockfile() to be nested.
- flockfile.10
All functions that reference ( FILE *) objects shall behave as if they use flockfile() and funlockfile() internally to obtain ownership of these ( FILE *) objects.
- [+]ftrylockfile (11 / 7 / 0)
- ftrylockfile.01
These functions shall provide for explicit application-level locking of stdio ( FILE *) objects. These functions can be used by a thread to delineate a sequence of I/O statements that are executed as a unit.
- ftrylockfile.02
The ftrylockfile() function shall acquire for a thread ownership of a ( FILE *) object if the object is available; ftrylockfile() is a non-blocking version of flockfile().
- ftrylockfile.04
The functions shall behave as if there is a lock count associated with each ( FILE *) object.
- ftrylockfile.05
This count is implicitly initialized to zero when the ( FILE *) object is created.
- ftrylockfile.06
The ( FILE *) object is unlocked when the count is zero.
- ftrylockfile.07
When the count is positive, a single thread owns the ( FILE *) object.
- ftrylockfile.08.01
When the flockfile() function is called, if the count is zero or if the count is positive and the caller owns the ( FILE *) object, the count shall be incremented.
- ftrylockfile.09
This allows matching calls to flockfile() (or successful calls to ftrylockfile()) and funlockfile() to be nested.
- ftrylockfile.10
All functions that reference ( FILE *) objects shall behave as if they use flockfile() and funlockfile() internally to obtain ownership of these ( FILE *) objects.
- ftrylockfile.11.01
The ftrylockfile() function shall return zero for success
- ftrylockfile.11.02
and non-zero to indicate that the lock cannot be acquired.
- [+]funlockfile (9 / 5 / 0)
- funlockfile.01
These functions shall provide for explicit application-level locking of stdio ( FILE *) objects. These functions can be used by a thread to delineate a sequence of I/O statements that are executed as a unit.
- funlockfile.02
The funlockfile() function shall relinquish the ownership granted to the thread.
- app.funlockfile.03
The behavior is undefined if a thread other than the current owner calls the funlockfile() function.
- funlockfile.04
The functions shall behave as if there is a lock count associated with each ( FILE *) object.
- funlockfile.05
This count is implicitly initialized to zero when the ( FILE *) object is created.
- funlockfile.06
The ( FILE *) object is unlocked when the count is zero.
- funlockfile.07
When the count is positive, a single thread owns the ( FILE *) object.
- funlockfile.08
Each call to funlockfile() shall decrement the count.
- funlockfile.09
This allows matching calls to flockfile() (or successful calls to ftrylockfile()) and funlockfile() to be nested.
- funlockfile.10
All functions that reference ( FILE *) objects shall behave as if they use flockfile() and funlockfile() internally to obtain ownership of these ( FILE *) objects.
- [+]io.fstream.wstream (169 / 42 / 0)
- [+]fgetwc (18 / 4 / 0)
- fgetwc.01.01
The fgetwc() function shall obtain the next character (if present) from the input stream pointed to by stream,
- fgetwc.01.02
convert that to the corresponding wide-character code,
- fgetwc.01.03
and advance the associated file position indicator for the stream (if defined).
- fgetwc.02
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- fgetwc.03
The fgetwc() function may mark the st_atime field of the file associated with stream for update.
- fgetwc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- fgetwc.05
Upon successful completion, the fgetwc() function shall return the wide-character code of the character read from the input stream pointed to by stream converted to a type wint_t.
- fgetwc.06
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetwc() shall return WEOF.
- fgetwc.07
If a read error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, [CX] and shall set errno to indicate the error.
- fgetwc.08
If an encoding error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, and shall set errno to indicate the error.
- fgetwc.09
The fgetwc() function shall fail if data needs to be read and:
- fgetwc.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetwc() operation.
- fgetwc.09.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- fgetwc.09.03
[EILSEQ] The data obtained from the input stream does not form a valid character.
- fgetwc.09.04
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- fgetwc.09.05
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- fgetwc.09.06
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- fgetwc.10
The fgetwc() function may fail if:
- fgetwc.10.01
[ENOMEM] [CX] Insufficient storage space is available.
- fgetwc.10.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fgetws (19 / 4 / 0)
- fgetws.01.01
The fgetws() function shall read characters from the stream,
- fgetws.01.02
convert these to the corresponding wide-character codes,
- fgetws.01.03
place them in the wchar_t array pointed to by ws, until n-1 characters are read, or a <newline> is read,
- fgetws.01.04
converted, and transferred to ws, or an end-of-file condition is encountered.
- fgetws.02
he wide-character string, ws, shall then be terminated with a null wide-character code.
- fgetws.03
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- fgetws.04
The fgetws() function may mark the st_atime field of the file associated with stream for update.
- fgetws.05
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- fgetws.06
Upon successful completion, fgetws() shall return ws.
- fgetws.07
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetws() shall return a null pointer.
- fgetws.08
If a read error occurs, the error indicator for the stream shall be set, fgetws() shall return a null pointer, [CX] and shall set errno to indicate the error.
- fgetws.09
The fgetwc() function shall fail if data needs to be read and:
- fgetws.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetwc() operation.
- fgetws.09.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- fgetws.09.03
[EILSEQ] The data obtained from the input stream does not form a valid character.
- fgetws.09.04
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- fgetws.09.05
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- fgetws.09.06
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- fgetws.10
The fgetwc() function may fail if:
- fgetws.10.01
[ENOMEM] [CX] Insufficient storage space is available.
- fgetws.10.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fputwc (18 / 5 / 0)
- fputwc.01.01
The fputwc() function shall write the character corresponding to the wide-character code wc to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- fputwc.01.02
and advances the indicator appropriately.
- fputwc.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the character is appended to the output stream.
- fputwc.03
If an error occurs while writing the character, the shift state of the output file is left in an undefined state.
- fputwc.04
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputwc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- fputwc.05.01
Upon successful completion, fputwc() shall return wc.
- fputwc.05.02
Otherwise, it shall return WEOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- fputwc.06
The fputwc() function shall fail if either the stream is unbuffered or data in the stream's buffer needs to be written, and:
- fputwc.06.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fputwc.06.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- fputwc.06.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size or the process' file size limit.
- fputwc.06.04
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fputwc.06.05
[EILSEQ] The wide-character code wc does not correspond to a valid character.
- fputwc.06.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fputwc.06.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fputwc.06.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fputwc.06.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fputwc.07
The fputwc() function may fail if:
- fputwc.07.01
[ENOMEM] [CX] Insufficient storage space is available.
- fputwc.07.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fputws (16 / 4 / 0)
- fputws.01
The fputws() function shall write a character string corresponding to the (null-terminated) wide-character string pointed to by ws to the stream pointed to by stream.
- fputws.02
No character corresponding to the terminating null wide-character code shall be written.
- fputws.03
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputws() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- fputws.04.01
Upon successful completion, fputws() shall return a non-negative number.
- fputws.04.02
Otherwise, it shall return -1, set an error indicator for the stream, [CX] and set errno to indicate the error.
- fputws.06
The fputwc() function shall fail if either the stream is unbuffered or data in the stream's buffer needs to be written, and:
- fputws.06.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- fputws.06.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- fputws.06.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size or the process' file size limit.
- fputws.06.04
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- fputws.06.05
[EILSEQ] The wide-character code wc does not correspond to a valid character.
- fputws.06.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- fputws.06.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- fputws.06.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- fputws.06.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- fputws.07
The fputwc() function may fail if:
- fputws.07.01
[ENOMEM] [CX] Insufficient storage space is available.
- fputws.07.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]fwide (10 / 1 / 0)
- fwide.01
The fwide() function shall determine the orientation of the stream pointed to by stream.
- fwide.02.01
If mode is greater than zero, the function first attempts to make the stream wide-oriented.
- fwide.02.02
If mode is less than zero, the function first attempts to make the stream byte-oriented.
- fwide.02.03
Otherwise, mode is zero and the function does not alter the orientation of the stream.
- fwide.03
If the orientation of the stream has already been determined, fwide() shall not change it.
- fwide.04
Since no return value is reserved to indicate an error, an application wishing to check for error situations should set errno to 0, then call fwide(), then check errno, and if it is non-zero, assume an error has occurred.
- fwide.05.01
The fwide() function shall return a value greater than zero if, after the call, the stream has wide-orientation,
- fwide.05.02
a value less than zero if the stream has byte-orientation,
- fwide.05.03
or zero if the stream has no orientation.
- fwide.06
The fwide() function may fail if:
- fwide.06.01
[EBADF] [CX] The stream argument is not a valid stream.
- [+]getwc (19 / 5 / 0)
- getwc.01
The getwc() function shall be equivalent to fgetwc(), except that if it is implemented as a macro it may evaluate stream more than once, so the argument should never be an expression with side effects.
- getwc.fgetwc.01.01
The fgetwc() function shall obtain the next character (if present) from the input stream pointed to by stream,
- getwc.fgetwc.01.02
convert that to the corresponding wide-character code,
- getwc.fgetwc.01.03
and advance the associated file position indicator for the stream (if defined).
- getwc.fgetwc.02
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- getwc.fgetwc.03
The fgetwc() function may mark the st_atime field of the file associated with stream for update.
- getwc.fgetwc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getwc.fgetwc.05
Upon successful completion, the fgetwc() function shall return the wide-character code of the character read from the input stream pointed to by stream converted to a type wint_t.
- getwc.fgetwc.06
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetwc() shall return WEOF.
- getwc.fgetwc.07
If a read error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, [CX] and shall set errno to indicate the error.
- getwc.fgetwc.08
If an encoding error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, and shall set errno to indicate the error.
- getwc.fgetwc.09
The fgetwc() function shall fail if data needs to be read and:
- getwc.fgetwc.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetwc() operation.
- getwc.fgetwc.09.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getwc.fgetwc.09.03
[EILSEQ] The data obtained from the input stream does not form a valid character.
- getwc.fgetwc.09.04
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getwc.fgetwc.09.05
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getwc.fgetwc.09.06
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getwc.fgetwc.10
The fgetwc() function may fail if:
- getwc.fgetwc.10.01
[ENOMEM] [CX] Insufficient storage space is available.
- getwc.fgetwc.10.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]getwchar (19 / 5 / 0)
- getwchar.01
The getwchar() function shall be equivalent to getwc(stdin).
- getwchar.fgetwc.01.01
The fgetwc() function shall obtain the next character (if present) from the input stream pointed to by stream,
- getwchar.fgetwc.01.02
convert that to the corresponding wide-character code,
- getwchar.fgetwc.01.03
and advance the associated file position indicator for the stream (if defined).
- getwchar.fgetwc.02
If an error occurs, the resulting value of the file position indicator for the stream is unspecified.
- getwchar.fgetwc.03
The fgetwc() function may mark the st_atime field of the file associated with stream for update.
- getwchar.fgetwc.04
The st_atime field shall be marked for update by the first successful execution of fgetc(), fgets(), fgetwc(), fgetws(), fread(), fscanf(), getc(), getchar(), gets(), or scanf() using stream that returns data not supplied by a prior call to ungetc() or ungetwc().
- getwchar.fgetwc.05
Upon successful completion, the fgetwc() function shall return the wide-character code of the character read from the input stream pointed to by stream converted to a type wint_t.
- getwchar.fgetwc.06
If the stream is at end-of-file, the end-of-file indicator for the stream shall be set and fgetwc() shall return WEOF.
- getwchar.fgetwc.07
If a read error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, [CX] and shall set errno to indicate the error.
- getwchar.fgetwc.08
If an encoding error occurs, the error indicator for the stream shall be set, fgetwc() shall return WEOF, and shall set errno to indicate the error.
- getwchar.fgetwc.09
The fgetwc() function shall fail if data needs to be read and:
- getwchar.fgetwc.09.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the fgetwc() operation.
- getwchar.fgetwc.09.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for reading.
- getwchar.fgetwc.09.03
[EILSEQ] The data obtained from the input stream does not form a valid character.
- getwchar.fgetwc.09.04
[EINTR] [CX] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- getwchar.fgetwc.09.05
[EIO] [CX] A physical I/O error has occurred, or the process is in a background process group attempting to read from its controlling terminal, and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. This error may also be generated for implementation-defined reasons.
- getwchar.fgetwc.09.06
[EOVERFLOW] [CX] The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
- getwchar.fgetwc.10
The fgetwc() function may fail if:
- getwchar.fgetwc.10.01
[ENOMEM] [CX] Insufficient storage space is available.
- getwchar.fgetwc.10.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putwc (19 / 6 / 0)
- putwc.01
The putwc() function shall be equivalent to fputwc(), except that if it is implemented as a macro it may evaluate stream more than once, so the argument should never be an expression with side effects.
- putwc.fputwc.01.01
The fputwc() function shall write the character corresponding to the wide-character code wc to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- putwc.fputwc.01.02
and advances the indicator appropriately.
- putwc.fputwc.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the character is appended to the output stream.
- putwc.fputwc.03
If an error occurs while writing the character, the shift state of the output file is left in an undefined state.
- putwc.fputwc.04
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputwc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putwc.fputwc.05.01
Upon successful completion, fputwc() shall return wc.
- putwc.fputwc.05.02
Otherwise, it shall return WEOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- putwc.fputwc.06
The fputwc() function shall fail if either the stream is unbuffered or data in the stream's buffer needs to be written, and:
- putwc.fputwc.06.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putwc.fputwc.06.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putwc.fputwc.06.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size or the process' file size limit.
- putwc.fputwc.06.04
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- putwc.fputwc.06.05
[EILSEQ] The wide-character code wc does not correspond to a valid character.
- putwc.fputwc.06.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putwc.fputwc.06.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putwc.fputwc.06.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putwc.fputwc.06.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putwc.fputwc.07
The fputwc() function may fail if:
- putwc.fputwc.07.01
[ENOMEM] [CX] Insufficient storage space is available.
- putwc.fputwc.07.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]putwchar (19 / 6 / 0)
- putwchar.01
The function call putwchar(wc) shall be equivalent to putwc(wc,stdout).
- putwchar.fputwc.01.01
The fputwc() function shall write the character corresponding to the wide-character code wc to the output stream pointed to by stream, at the position indicated by the associated file-position indicator for the stream (if defined),
- putwchar.fputwc.01.02
and advances the indicator appropriately.
- putwchar.fputwc.02
If the file cannot support positioning requests, or if the stream was opened with append mode, the character is appended to the output stream.
- putwchar.fputwc.03
If an error occurs while writing the character, the shift state of the output file is left in an undefined state.
- putwchar.fputwc.04
The st_ctime and st_mtime fields of the file shall be marked for update between the successful execution of fputwc() and the next successful completion of a call to fflush() or fclose() on the same stream or a call to exit() or abort().
- putwchar.fputwc.05.01
Upon successful completion, fputwc() shall return wc.
- putwchar.fputwc.05.02
Otherwise, it shall return WEOF, the error indicator for the stream shall be set, [CX] and errno shall be set to indicate the error.
- putwchar.fputwc.06
The fputwc() function shall fail if either the stream is unbuffered or data in the stream's buffer needs to be written, and:
- putwchar.fputwc.06.01
[EAGAIN] [CX] The O_NONBLOCK flag is set for the file descriptor underlying stream and the thread would be delayed in the write operation.
- putwchar.fputwc.06.02
[EBADF] [CX] The file descriptor underlying stream is not a valid file descriptor open for writing.
- putwchar.fputwc.06.03
[EFBIG] [CX] An attempt was made to write to a file that exceeds the maximum file size or the process' file size limit.
- putwchar.fputwc.06.04
[EFBIG] [CX] The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
- putwchar.fputwc.06.05
[EILSEQ] The wide-character code wc does not correspond to a valid character.
- putwchar.fputwc.06.06
[EINTR] [CX] The write operation was terminated due to the receipt of a signal, and no data was transferred.
- putwchar.fputwc.06.07
[EIO] [CX] A physical I/O error has occurred, or the process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned. This error may also be returned under implementation-defined conditions.
- putwchar.fputwc.06.08
[ENOSPC] [CX] There was no free space remaining on the device containing the file.
- putwchar.fputwc.06.09
[EPIPE] [CX] An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal shall also be sent to the thread.
- putwchar.fputwc.07
The fputwc() function may fail if:
- putwchar.fputwc.07.01
[ENOMEM] [CX] Insufficient storage space is available.
- putwchar.fputwc.07.02
[ENXIO] [CX] A request was made of a nonexistent device, or the request was outside the capabilities of the device.
- [+]ungetwc (12 / 2 / 0)
- ungetwc.01
The ungetwc() function shall push the character corresponding to the wide-character code specified by wc back onto the input stream pointed to by stream.
- ungetwc.02
The pushed-back characters shall be returned by subsequent reads on that stream in the reverse order of their pushing.
- ungetwc.03
A successful intervening call (with the stream pointed to by stream) to a file-positioning function ( fseek(), fsetpos(), or rewind()) discards any pushed-back characters for the stream.
- ungetwc.04
The external storage corresponding to the stream is unchanged.
- ungetwc.05
At least one character of push-back shall be provided. If ungetwc() is called too many times on the same stream without an intervening read or file-positioning operation on that stream, the operation may fail.
- ungetwc.06
If the value of wc equals that of the macro WEOF, the operation shall fail and the input stream shall be left unchanged.
- ungetwc.07
A successful call to ungetwc() shall clear the end-of-file indicator for the stream.
- ungetwc.08
The value of the file-position indicator for the stream after reading or discarding all pushed-back characters shall be the same as it was before the characters were pushed back.
- ungetwc.08.01
The file-position indicator is decremented (by one or more) by each successful call to ungetwc();
- ungetwc.08.02
if its value was 0 before a call, its value is unspecified after the call.
- ungetwc.09.01
Upon successful completion, ungetwc() shall return the wide-character code corresponding to the pushed-back character.
- ungetwc.09.02
Otherwise, it shall return WEOF.
- ungetwc.10
The ungetwc() function may fail if:
- ungetwc.10.01
[EILSEQ] [CX] An invalid character sequence is detected, or a wide-character code does not correspond to a valid character.
- [+]io.multiplex (68 / 21 / 0)
- [+]poll (30 / 13 / 0)
- poll.01
The poll() function provides applications with a mechanism for multiplexing input/output over a set of file descriptors.
Generalizes:
- &poll.02
- &poll.07.05
- poll.02
- poll.07.01.01
- poll.07.02.01
- poll.07.03.01
- poll.07.04.01
- poll.07.05.01
- poll.07.06.01
- poll.07.07.01
- poll.07.07.02
- poll.07.08.01
- poll.07.08.02
- poll.07.08.03
- poll.07.08.04
- poll.07.09.01
- poll.07.09.02
- poll.08
- poll.09
- poll.10
- poll.11
- poll.12
- poll.13.01
- poll.13.02
- poll.14
- poll.15
- poll.17
- poll.18
- poll.19
- poll.20.01.01
- poll.20.01.02
- poll.20.02
- poll.21.02
- poll.21.03
- poll.02
For each member of the array pointed to by fds, poll() shall examine the given file descriptor for the event(s) specified in events.
The poll() function shall identify those file descriptors on which an application can read or write data, or on which certain events have occurred.
- app.poll.03 (struct)
The number of pollfd structures in the fds array is specified by nfds.
- app.poll.04 (struct)
The fds argument specifies the file descriptors to be examined and the events of interest for each file descriptor.
- app.poll.05
It is a pointer to an array with one member for each open file descriptor of interest.
- app.poll.06 (struct)
The array's members are pollfd structures within which fd specifies an open file descriptor and events and revents are bitmasks constructed by OR'ing a combination of the following event flags:
- poll.07.01
POLLIN
- poll.07.01.01
Data other than high-priority data may be read without blocking.
- poll.07.02
POLLRDNORM
- poll.07.02.01
Normal data may be read without blocking.
- poll.07.03
POLLRDBAND
- poll.07.03.01
Priority data may be read without blocking.
- poll.07.04
POLLPRI
- poll.07.04.01
High-priority data may be read without blocking.
- poll.07.05
POLLOUT
- poll.07.05.01
Normal data may be written without blocking.
- poll.07.06
POLLWRBAND
- poll.07.06.01
Priority data may be written.
- poll.07.07
POLLERR
- poll.07.07.01
An error has occurred on the device or stream.
- poll.07.07.02
This flag is only valid in the revents bitmask; it shall be ignored in the events member.
- poll.07.08
POLLHUP
- poll.07.08.01
The device has been disconnected.
- poll.07.08.02
This event and POLLOUT are mutually-exclusive; a stream can never be writable if a hangup has occurred.
- poll.07.08.03 (struct)
However, this event and POLLIN, POLLRDNORM, POLLRDBAND, or POLLPRI are not mutually-exclusive
- poll.07.08.04
This flag is only valid in the revents bitmask; it shall be ignored in the events member.
- poll.07.09
POLLNVAL
- poll.07.09.01
The specified fd value is invalid.
- poll.07.09.02
This flag is only valid in the revents member; it shall ignored in the events member.
- poll.08 (struct)
The significance and semantics of normal, priority, and high-priority data are file and device-specific.
- poll.09
If the value of fd is less than 0, events shall be ignored, and revents shall be set to 0 in that entry on return from poll().
- poll.10
In each pollfd structure, poll() shall clear the revents member, except that where the application requested a report on a condition by setting one of the bits of events listed above, poll() shall set the corresponding bit in revents if the requested condition is true.
- poll.11
In addition, poll() shall set the POLLHUP, POLLERR, and POLLNVAL flag in revents if the condition is true, even if the application did not set the corresponding bit in events.
- poll.12
If none of the defined events have occurred on any selected file descriptor, poll() shall wait at least timeout milliseconds for an event to occur on any of the selected file descriptors.
- poll.13.01
If the value of timeout is 0, poll() shall return immediately.
- poll.13.02
If the value of timeout is -1, poll() shall block until a requested event occurs or until the call is interrupted.
- poll.14 (struct)
Implementations may place limitations on the granularity of timeout intervals. If the requested timeout interval requires a finer granularity than the implementation supports, the actual timeout interval shall be rounded up to the next supported value.
- poll.15
The poll() function shall not be affected by the O_NONBLOCK flag.
- app.poll.16
The poll() function shall support regular files, terminal and pseudo-terminal devices, FIFOs, pipes, sockets and [XSR] STREAMS-based files. The behavior of poll() on eelements of fds that refer to other types of file is unspecified.
- poll.17
Regular files shall always poll TRUE for reading and writing.
- poll.18
A file descriptor for a socket that is listening for connections shall indicate that it is ready for reading, once connections are available.
- poll.19
A file descriptor for a socket that is connecting asynchronously shall indicate that it is ready for writing, once a connection has been established.
- poll.20.01
Upon successful completion, poll() shall return a non-negative value.
- poll.20.01.01
A positive value indicates the total number of file descriptors that have been selected (that is, file descriptors for which the revents member is non-zero).
- poll.20.01.02
A value of 0 indicates that the call timed out and no file descriptors have been selected.
- poll.20.02
Upon failure, poll() shall return -1 and set errno to indicate the error.
- poll.21
The poll() function shall fail if:
- poll.21.02
[EINTR] A signal was caught during poll().
- poll.21.03
[EINVAL] The nfds argument is greater than {OPEN_MAX} , [XSR] or one of the fd members refers to a STREAM or multiplexer that is linked (directly or indirectly) downstream from a multiplexer.
- [+]select (38 / 8 / 0)
- select.01
The select() function shall be equivalent to the pselect() function, except as follows:
- select.01.01
For the select() function, the timeout period is given in seconds and microseconds in an argument of type struct timeval, whereas for the pselect() function the timeout period is given in seconds and nanoseconds in an argument of type struct timespec.
- select.01.02 (struct)
The select() function has no sigmask argument; it shall behave as pselect() does when sigmask is a null pointer.
- select.01.03 (struct)
Upon successful completion, the select() function may modify the object pointed to by the timeout argument.
- app.select.02
The pselect() and select() functions shall support regular files, terminal and pseudo-terminal devices, [XSR] STREAMS-based files, FIFOs, pipes, and sockets. The behavior of pselect() and select() on file descriptors that refer to other types of file is unspecified.
- select.03 (struct)
The nfds argument specifies the range of descriptors to be tested.
- select.04
The first nfds descriptors shall be checked in each set; that is, the descriptors from zero through nfds-1 in the descriptor sets shall be examined.
- select.05
If the readfds argument is not a null pointer, it points to an object of type fd_set that on input specifies the file descriptors to be checked for being ready to read, and on output indicates which file descriptors are ready to read.
- select.06
If the writefds argument is not a null pointer, it points to an object of type fd_set that on input specifies the file descriptors to be checked for being ready to write, and on output indicates which file descriptors are ready to write.
- select.07
If the errorfds argument is not a null pointer, it points to an object of type fd_set that on input specifies the file descriptors to be checked for error conditions pending, and on output indicates which file descriptors have error conditions pending.
- select.08
Upon successful completion, the pselect() or select() function shall modify the objects pointed to by the readfds, writefds, and errorfds arguments to indicate which file descriptors are ready for reading, ready for writing, or have an error condition pending, respectively, and shall return the total number of ready descriptors in all the output sets.
- select.09
For each file descriptor less than nfds, the corresponding bit shall be set on successful completion if it was set on input and the associated condition is true for that file descriptor.
- select.10
If none of the selected descriptors are ready for the requested operation, the pselect() or select() function shall block until at least one of the requested operations becomes ready, until the timeout occurs, or until interrupted by a signal.
- select.11
The timeout parameter controls how long the pselect() or select() function shall take before timing out.
- select.12
If the timeout parameter is not a null pointer, it specifies a maximum interval to wait for the selection to complete.
- select.13
If the specified time interval expires without any requested operation becoming ready, the function shall return.
- select.14
If the timeout parameter is a null pointer, then the call to pselect() or select() shall block indefinitely until at least one descriptor meets the specified criteria.
- select.15 (struct)
To effect a poll, the timeout parameter should not be a null pointer, and should point to a zero-valued timespec structure.
- select.16
The use of a timeout does not affect any pending timers set up by alarm(), ualarm(), or setitimer().
- select.17 (struct)
Implementations may place limitations on the maximum timeout interval supported.
- select.20 (struct)
Implementations may also place limitations on the granularity of timeout intervals.
- select.23 (struct)
A descriptor shall be considered ready for reading when a call to an input function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully.
- select.24 (struct)
The function might return data, an end-of-file indication, or an error other than one indicating that it is blocked, and in each of these cases the descriptor shall be considered ready for reading.
- select.25 (struct)
A descriptor shall be considered ready for writing when a call to an output function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully.
- select.26
If a socket has a pending error, it shall be considered to have an exceptional condition pending.
- select.27
Otherwise, what constitutes an exceptional condition is file type-specific.
- select.28
For a file descriptor for use with a socket, it is protocol-specific except as noted below. For other file types it is implementation-defined.
- select.29
If the operation is meaningless for a particular file type, pselect() or select() shall indicate that the descriptor is ready for read or write operations, and shall indicate that the descriptor has no exceptional condition pending.
- select.30
If a descriptor refers to a socket, the implied input function is the recvmsg() function with parameters requesting normal and ancillary data, such that the presence of either type shall cause the socket to be marked as readable.
- select.31
The presence of out-of-band data shall be checked if the socket option SO_OOBINLINE has been enabled, as out-of-band data is enqueued with normal data.
- select.32
If the socket is currently listening, then it shall be marked as readable if an incoming connection request has been received, and a call to the accept() function shall complete without blocking.
- select.33
If a descriptor refers to a socket, the implied output function is the sendmsg() function supplying an amount of normal data equal to the current value of the SO_SNDLOWAT option for the socket.
- select.34
If a non-blocking call to the connect() function has been made for a socket, and the connection attempt has either succeeded or failed leaving a pending error, the socket shall be marked as writable.
- select.35
A socket shall be considered to have an exceptional condition pending if a receive operation with O_NONBLOCK clear for the open file description and with the MSG_OOB flag set would return out-of-band data without blocking.
- select.36
It is protocol-specific whether the MSG_OOB flag would be used to read out-of-band data.
- select.37
A socket shall also be considered to have an exceptional condition pending if an out-of-band data mark is present in the receive queue.
- select.38
Other circumstances under which a socket may be considered to have an exceptional condition pending are protocol-specific and implementation-defined.
- select.39
If the readfds, writefds, and errorfds arguments are all null pointers and the timeout argument is not a null pointer, the pselect() or select() function shall block for the time specified, or until interrupted by a signal.
- select.40
If the readfds, writefds, and errorfds arguments are all null pointers and the timeout argument is a null pointer, the pselect() or select() function shall block until interrupted by a signal.
- select.41
File descriptors associated with regular files shall always select true for ready to read, ready to write, and error conditions.
- select.42
On failure, the objects pointed to by the readfds, writefds, and errorfds arguments shall not be modified.
- select.43
If the timeout interval expires without the specified condition being true for any of the specified file descriptors, the objects pointed to by the readfds, writefds, and errorfds arguments shall have all bits set to 0.
- select.44.01
Upon successful completion, the pselect() and select() functions shall return the total number of bits set in the bit masks.
- select.44.02
Otherwise, -1 shall be returned, and errno shall be set to indicate the error.
- select.45
Under the following conditions, pselect() and select() shall fail and set errno to:
- select.45.01
[EBADF] One or more of the file descriptor sets specified a file descriptor that is not a valid open file descriptor.
- select.45.02
[EINTR] The function was interrupted before any of the selected events occurred and before the timeout interval expired. [XSI] If SA_RESTART has been set for the interrupting signal, it is implementation-defined whether the function restarts or returns with [EINTR].
- select.45.03
[EINVAL] An invalid timeout interval was specified.
- select.45.04
[EINVAL] The nfds argument is less than 0 or greater than FD_SETSIZE.
- select.45.05
[EINVAL] [XSR] One of the specified file descriptors refers to a STREAM or multiplexer that is linked (directly or indirectly) downstream from a multiplexer.
- [+]io.pipe (10 / 8 / 0)
- [+]pipe (10 / 8 / 0)
- pipe.01
The pipe() function shall create a pipe and place two file descriptors, one each into the arguments fildes[0] and fildes[1], that refer to the open file descriptions for the read and write ends of the pipe.
- pipe.02
Their integer values shall be the two lowest available at the time of the pipe() call.
- pipe.03
The O_NONBLOCK and FD_CLOEXEC flags shall be clear on both file descriptors.
- pipe.04
Data can be written to the file descriptor fildes[1] and read from the file descriptor fildes[0].
- pipe.05
read on the file descriptor fildes[0] shall access data written to the file descriptor fildes[1] on a first-in-first-out basis.
- app.pipe.06
It is unspecified whether fildes[0] is also open for writing and whether fildes[1] is also open for reading.
- pipe.07 (struct)
A process has the pipe open for reading (correspondingly writing) if it has a file descriptor open that refers to the read end, fildes[0] (write end, fildes[1]).
- pipe.08
Upon successful completion, pipe() shall mark for update the st_atime, st_ctime, and st_mtime fields of the pipe.
- pipe.09.01
Upon successful completion, 0 shall be returned;
- pipe.09.02
otherwise, -1 shall be returned and errno set to indicate the error.
- pipe.10
The pipe() function shall fail if:
- pipe.10.01
[EMFILE] More than {OPEN_MAX} minus two file descriptors are already in use by this process.
- pipe.10.02
[ENFILE] The number of simultaneously open files in the system would exceed a system-imposed limit.
- [+]io.streams (7 / 0 / 0)
- [+]ioctl (7 / 0 / 0)
- ioctl.01
The ioctl() function shall manipulate the underlying device parameters of special files.
- ioctl.02
On success, 0 is returned. An ioctl() may use the return value as an output parameter and return a non-negative value on success.
- ioctl.03
On error, -1 is returned and the global variable errno is set appropriately.
- ioctl.03.01
[EBADF] fildes is not a valid descriptor.
- ioctl.03.02
[EFAULT] The third parameter references an inaccessible memory area.
- ioctl.03.03
[ENOTTY] fildes is not associated with a character special device.
- ioctl.03.04
[ENOTTY] The specified request does not apply to the kind of object that fildes references.
- ioctl.03.05
[EINVAL] request or the third parameter is not valid.
- [+]io.syslog (63 / 13 / 0)
- [+]closelog (1 / 0 / 0)
- closelog.01
The closelog() function shall close any open file descriptors allocated by previous calls to openlog() or syslog().
- closelog.02 (struct)
The closelog(), openlog(), and syslog() functions shall not return a value.
- [+]openlog (19 / 3 / 0)
- openlog.01.L0
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L1
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L2
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L3
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L4
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L5
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L6
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.L7
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.01.USR
The facility indicates the application or system component generating the message. Possible facility values include:LOG_USER Messages generated by arbitrary processes. This is the default facility identifier if none is specified. LOG_LOCAL0 Reserved for local use. LOG_LOCAL1 Reserved for local use. LOG_LOCAL2 Reserved for local use. LOG_LOCAL3 Reserved for local use. LOG_LOCAL4 Reserved for local use. LOG_LOCAL5 Reserved for local use. LOG_LOCAL6 Reserved for local use. LOG_LOCAL7 Reserved for local use.
- openlog.02
The openlog() function shall set process attributes that affect subsequent calls to syslog().
Generalizes:
- openlog.01.L0
- openlog.01.L1
- openlog.01.L2
- openlog.01.L3
- openlog.01.L4
- openlog.01.L5
- openlog.01.L6
- openlog.01.L7
- openlog.01.USR
- openlog.03
- openlog.04.01.CON.01
- openlog.04.01.CON.02
- openlog.04.01.NDE
- openlog.04.01.NOW
- openlog.04.01.ODE
- openlog.04.01.PID
- openlog.05
- openlog.06
- openlog.07
- openlog.03
The ident argument is a string that is prepended to every message.
- openlog.04
The logopt argument indicates logging options.
- openlog.04.01
Values for logopt are constructed by a bitwise-inclusive OR of zero or more of the following:
- openlog.04.01.CON
LOG_CONS Write messages to the system console if they cannot be sent to the logging facility. The syslog() function ensures that the process does not acquire the console as a controlling terminal in the process of writing the message.
- openlog.04.01.CON.01
Write messages to the system console if they cannot be sent to the logging facility.
- openlog.04.01.CON.02
The syslog() function ensures that the process does not acquire the console as a controlling terminal in the process of writing the message.
- openlog.04.01.NDE
LOG_NDELAY Open the connection to the logging facility immediately. Normally the open is delayed until the first message is logged. This is useful for programs that need to manage the order in which file descriptors are allocated.
- openlog.04.01.NOW
LOG_NOWAIT Do not wait for child processes that may have been created during the course of logging the message. This option should be used by processes that enable notification of child termination using SIGCHLD, since syslog() may otherwise block waiting for a child whose exit status has already been collected.
- openlog.04.01.ODE
LOG_ODELAY Delay open until syslog() is called.
- openlog.04.01.PID
LOG_PID Log the process ID with each message. This is useful for identifying specific processes.
- openlog.05
The facility argument encodes a default facility to be assigned to all messages that do not have an explicit facility already encoded.
- openlog.06
The openlog() and syslog() functions may allocate a file descriptor.
- openlog.07 (struct)
The closelog(), openlog(), and syslog() functions shall not return a value.
- [+]setlogmask (4 / 4 / 0)
- setlogmask.01
The setlogmask() function shall set the log priority mask for the current process to maskpri and return the previous mask.
- setlogmask.02
If the maskpri argument is 0, the current log mask is not modified.
- setlogmask.03
A call to openlog() is not required prior to calling setlogmask().
- setlogmask.04
The setlogmask() function shall return the previous log priority mask.
- [+]syslog (19 / 3 / 0)
- syslog.01
The syslog() function shall send a message to an implementation-defined logging facility, which may log it in an implementation-defined system log, write it to the system console, forward it to a list of users, or forward it to the logging facility on another host over the network.
Generalizes:
- syslog.02.01
- syslog.02.02
- syslog.03
- syslog.05
- syslog.06.01
- syslog.06.02.ALE
- syslog.06.02.CRI
- syslog.06.02.DEB
- syslog.06.02.EME
- syslog.06.02.ERR
- syslog.06.02.INF
- syslog.06.02.NOT
- syslog.06.02.WAR
- syslog.07
- syslog.08
- syslog.09
- syslog.10
- syslog.11
- syslog.12
- syslog.02
The logged message shall include a message header and a message body.
- syslog.02.01
The message header contains at least a timestamp and a tag string.
- syslog.02.02
The message body is generated from the message and following arguments in the same manner as if these were arguments to printf(),
- syslog.03
except that the additional conversion specification %m shall be recognized; it shall convert no arguments, shall cause the output of the error message string associated with the value of errno on entry to syslog(), and may be mixed with argument specifications of the "%n$" form.
- app.syslog.04
If a complete conversion specification with the m conversion specifier character is not just %m, the behavior is undefined.
- syslog.05
A trailing <newline> may be added if needed.
- syslog.06
Values of the priority argument are formed by OR'ing together a severity-level value and an optional facility value.
- syslog.06.01
If no facility value is specified, the current default facility value is used.
- syslog.06.02.ALE
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.CRI
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.DEB
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.EME
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.ERR
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.INF
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.NOT
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.06.02.WAR
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- syslog.07
The initial default facility is LOG_USER.
- syslog.08
The openlog() and syslog() functions may allocate a file descriptor.
- syslog.09
It is not necessary to call openlog() prior to calling syslog().
Generalizes:
- syslog.01
- syslog.02.01
- syslog.02.02
- syslog.03
- syslog.05
- syslog.06.01
- syslog.06.02.ALE
- syslog.06.02.CRI
- syslog.06.02.DEB
- syslog.06.02.EME
- syslog.06.02.ERR
- syslog.06.02.INF
- syslog.06.02.NOT
- syslog.06.02.WAR
- syslog.07
- syslog.08
- syslog.10
- syslog.11
- syslog.12
- syslog.10
Calls by the current process to syslog() with a priority not set in maskpri shall be rejected.
- syslog.11
The default log mask allows all priorities to be logged.
- syslog.12 (struct)
The closelog(), openlog(), and syslog() functions shall not return a value.
- [+]vsyslog (20 / 3 / 0)
- vsyslog.01
The syslog() function shall send a message to an implementation-defined logging facility, which may log it in an implementation-defined system log, write it to the system console, forward it to a list of users, or forward it to the logging facility on another host over the network.
Generalizes:
- vsyslog.02.01
- vsyslog.02.02
- vsyslog.03
- vsyslog.05
- vsyslog.06.01
- vsyslog.06.02.ALE
- vsyslog.06.02.CRI
- vsyslog.06.02.DEB
- vsyslog.06.02.EME
- vsyslog.06.02.ERR
- vsyslog.06.02.INF
- vsyslog.06.02.NOT
- vsyslog.06.02.WAR
- vsyslog.07
- vsyslog.08
- vsyslog.09
- vsyslog.10
- vsyslog.11
- vsyslog.12
- vsyslog.13
- vsyslog.02
The logged message shall include a message header and a message body.
- vsyslog.02.01
The message header contains at least a timestamp and a tag string.
- vsyslog.02.02
The message body is generated from the message and following arguments in the same manner as if these were arguments to printf(),
- vsyslog.03
except that the additional conversion specification %m shall be recognized; it shall convert no arguments, shall cause the output of the error message string associated with the value of errno on entry to syslog(), and may be mixed with argument specifications of the "%n$" form.
- app.vsyslog.04
If a complete conversion specification with the m conversion specifier character is not just %m, the behavior is undefined.
- vsyslog.05
A trailing <newline> may be added if needed.
- vsyslog.06
Values of the priority argument are formed by OR'ing together a severity-level value and an optional facility value.
- vsyslog.06.01
If no facility value is specified, the current default facility value is used.
- vsyslog.06.02.ALE
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.CRI
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.DEB
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.EME
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.ERR
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.INF
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.NOT
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.06.02.WAR
Possible values of severity level include:LOG_EMERG A panic condition. LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database. LOG_CRIT Critical conditions, such as hard device errors. LOG_ERR Errors. LOG_WARNING Warning messages. LOG_NOTICE Conditions that are not error conditions, but that may require special handling. LOG_INFO Informational messages. LOG_DEBUG Messages that contain information normally of use only when debugging a program.
- vsyslog.07
The initial default facility is LOG_USER.
- vsyslog.08
The openlog() and syslog() functions may allocate a file descriptor.
- vsyslog.09
It is not necessary to call openlog() prior to calling syslog().
Generalizes:
- vsyslog.01
- vsyslog.02.01
- vsyslog.02.02
- vsyslog.03
- vsyslog.05
- vsyslog.06.01
- vsyslog.06.02.ALE
- vsyslog.06.02.CRI
- vsyslog.06.02.DEB
- vsyslog.06.02.EME
- vsyslog.06.02.ERR
- vsyslog.06.02.INF
- vsyslog.06.02.NOT
- vsyslog.06.02.WAR
- vsyslog.07
- vsyslog.08
- vsyslog.10
- vsyslog.11
- vsyslog.12
- vsyslog.13
- vsyslog.10
Calls by the current process to syslog() with a priority not set in maskpri shall be rejected.
- vsyslog.11
The default log mask allows all priorities to be logged.
- vsyslog.12 (struct)
The closelog(), openlog(), and syslog() functions shall not return a value.
- vsyslog.13
The vsyslog() function is identical to syslog() as specified in ISO POSIX (2003), except that arglist (as defined by stdarg.h) replaces the variable number of arguments.
- [+]io.term (178 / 89 / 0)
- [+]cfgetispeed (1 / 1 / 0)
- cfgetispeed.01
The cfgetispeed() function shall extract the input baud rate from the termios structure to which the termios_p argument points.This function shall return exactly the value in the termios data structure, without interpretation.
- [+]cfgetospeed (1 / 1 / 0)
- cfgetospeed.01
The cfgetospeed() function shall extract the output baud rate from the termios structure to which the termios_p argument points.This function shall return exactly the value in the termios data structure, without interpretation.
- [+]cfmakeraw (4 / 4 / 0)
- cfmakeraw.01
The cfmakeraw() function shall set the attributes of the termios structure referenced by termios_p as follows: termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP |INLCR|IGNCR|ICRNL|IXON); termios_p->c_oflag &= ~OPOST; termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); termios_p->c_cflag &= ~(CSIZE|PARENB); termios_p->c_cflag |= CS8;
- cfmakeraw.01.01
termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP |INLCR|IGNCR|ICRNL|IXON);
- cfmakeraw.01.02
termios_p->c_oflag &= ~OPOST;
- cfmakeraw.01.03
termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- cfmakeraw.01.04
termios_p->c_cflag &= ~(CSIZE|PARENB); termios_p->c_cflag |= CS8;
- [+]cfsetispeed (6 / 4 / 0)
- cfsetispeed.01
The cfsetispeed() function shall set the input baud rate stored in the structure pointed to by termios_p to speed.
- cfsetispeed.02
There shall be no effect on the baud rates set in the hardware until a subsequent successful call to tcsetattr() with the same termios structure. Similarly, errors resulting from attempts to set baud rates not supported by the terminal device need not be detected until the tcsetattr() function is called.
- cfsetispeed.03
Upon successful completion, cfsetispeed() shall return 0;
- cfsetispeed.04
otherwise, -1 shall be returned, and errno may be set to indicate the error.
- cfsetispeed.05
The cfsetispeed() function may fail if:
- cfsetispeed.05.01
[EINVAL] The speed value is not a valid baud rate.
- cfsetispeed.05.02
[EINVAL] The value of speed is outside the range of possible speed values as specified in <termios.h>.
- [+]cfsetospeed (6 / 3 / 0)
- cfsetospeed.01
The cfsetospeed() function shall set the output baud rate stored in the structure pointed to by termios_p to speed.
- cfsetospeed.02
There shall be no effect on the baud rates set in the hardware until a subsequent successful call to tcsetattr() with the same termios structure. Similarly, errors resulting from attempts to set baud rates not supported by the terminal device need not be detected until the tcsetattr() function is called.
- cfsetospeed.03
Upon successful completion, cfsetospeed() shall return 0;
- cfsetospeed.04
otherwise, it shall return -1 and errno may be set to indicate the error.
- cfsetospeed.05
The cfsetospeed() function may fail if:
- cfsetospeed.05.01
[EINVAL] The speed value is not a valid baud rate.
- cfsetospeed.05.02
[EINVAL] The value of speed is outside the range of possible speed values as specified in <termios.h>.
- [+]cfsetspeed (4 / 3 / 0)
- cfsetspeed.01
cfsetspeed() sets both the input and output baud rates in the termios structure referenced by t to speed.
cfsetspeed() sets the baud rate values in the termios structure.
- cfsetspeed.02
The effects of the function on the terminal as described below do not become effective, nor are all errors detected, until the tcsetattr() function is called.
- cfsetspeed.03
On success, 0 is returned.
- cfsetspeed.04
On error, -1 is returned and the global variable errno is set appropriately.
- cfsetspeed.04.01
[EINVAL] Invalid speed argument
- [+]ctermid (3 / 2 / 0)
- app.ctermid.01
Otherwise, s is assumed to point to a character array of at least L_ctermid bytes;
- ctermid.01
The ctermid() function shall generate a string that, when used as a pathname, refers to the current controlling terminal for the current process.
- ctermid.02
the string is placed in this array and the value of s shall be returned.
- ctermid.03
The ctermid() function shall return an empty string if the pathname that would refer to the controlling terminal cannot be determined, or if the function is unsuccessful.
- [+]getlogin (7 / 3 / 0)
- getlogin.01
The getlogin() function shall return a pointer to a string containing the user name associated by the login activity with the controlling terminal of the current process. If getlogin() returns a non-null pointer, then that pointer points to the name that the user logged in under, even if there are several login names with the same user ID.
- getlogin.02
The maximum size of the login name is {LOGIN_NAME_MAX}.
- getlogin.03
Upon successful completion, getlogin() shall return a pointer to the login name or a null pointer if the user's login name cannot be found.
- getlogin.04
Otherwise, it shall return a null pointer and set errno to indicate the error.
- getlogin.05
The getlogin() and getlogin_r() functions may fail if:
- getlogin.05.01
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- getlogin.05.02
[ENFILE] The maximum allowable number of files is currently open in the system.
- getlogin.05.03
[ENXIO] The calling process has no controlling terminal.
- [+]getlogin_r (8 / 3 / 0)
- getlogin_r.01
If getlogin_r() is successful, name points to the name the user used at login, even if there are several login names with the same user ID.
The getlogin_r() function shall put the name associated by the login activity with the controlling terminal of the current process in the character array pointed to by name.
- app.getlogin_r.01
The array is namesize characters long and should have space for the name and the terminating null character.
- getlogin_r.02
The maximum size of the login name is {LOGIN_NAME_MAX}.
- getlogin_r.03
If successful, the getlogin_r() function shall return zero;
- getlogin_r.04
otherwise, an error number shall be returned to indicate the error.
- getlogin_r.05
The getlogin() and getlogin_r() functions may fail if:
- getlogin_r.05.01
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- getlogin_r.05.02
[ENFILE] The maximum allowable number of files is currently open in the system.
- getlogin_r.05.03
[ENXIO] The calling process has no controlling terminal.
- getlogin_r.05.04
[ERANGE] [TSF] The value of namesize is smaller than the length of the string to be returned including the terminating null character.
- [+]grantpt (8 / 5 / 0)
- app.grantpt.01
The fildes argument is a file descriptor that refers to a master pseudo-terminal device.
- grantpt.01
The grantpt() function shall change the mode and ownership of the slave pseudo-terminal device associated with its master pseudo-terminal counterpart.
- grantpt.01.01
The user ID of the slave shall be set to the real UID of the calling process
- grantpt.01.02
the group ID shall be set to an unspecified group ID.
- grantpt.01.03
The permission mode of the slave pseudo-terminal shall be set to readable and writable by the owner, and writable by the group.
- grantpt.02
Upon successful completion, grantpt() shall return 0;
- app.grantpt.02
The behavior of the grantpt() function is unspecified if the application has installed a signal handler to catch SIGCHLD signals.
- grantpt.03
otherwise, it shall return -1 and set errno to indicate the error.
- grantpt.04
The grantpt() function may fail if:
- grantpt.04.01
[EBADF] The fildes argument is not a valid open file descriptor.
- grantpt.04.02
[EINVAL] The fildes argument is not associated with a master pseudo-terminal device.
- grantpt.04.03
[EACCES] The corresponding slave pseudo-terminal device could not be accessed.
- [+]isatty (4 / 4 / 0)
- isatty.01
The isatty() function shall test whether fildes, an open file descriptor, is associated with a terminal device.
- isatty.01.01
The isatty() function shall return 1 if fildes is associated with a terminal;
- isatty.01.02
otherwise, it shall return 0 and may set errno to indicate the error.
- isatty.02
The isatty() function may fail if:
- isatty.02.01
[EBADF] The fildes argument is not a valid open file descriptor.
- isatty.02.02
[ENOTTY] The fildes argument is not associated with a terminal.
- [+]login_tty (8 / 1 / 0)
- login_tty.01
The login_tty() function shall prepare the terminal device referenced by the file descriptor fdr.
Generalizes:
- login_tty.02.01
- login_tty.02.02
- login_tty.02.03
- login_tty.03
- login_tty.04.01
- login_tty.04.02
- login_tty.05.01
- login_tty.02
This function
- login_tty.02.01
shall create a new session,
- login_tty.02.02
make the terminal the controlling terminal for the current process,
- login_tty.02.03
and set the standard input, output, and error streams of the current process to the terminal
- login_tty.03
If fdr is not the standard input, output or error stream, then login_tty() shall close fdr.
- login_tty.04.01
On success, login_tty() shall return zero;
- login_tty.04.02
otherwise -1 is returned, and errno shall be set appropriately.
- login_tty.05.01
[ENOTTY] fdr does not refer to a terminal device.
- [+]openpty (6 / 5 / 0)
- openpty.01
The openpty() function shall find an available pseudo-terminal and return file descriptors for the master and slave devices in the locations referenced by amaster and aslave respectively.
- openpty.02
If name is not NULL, the filename of the slave shall be placed in the user supplied buffer referenced by name.
- openpty.03
If termp is not NULL, it shall point to a termios structure used to initialize the terminal parameters of the slave pseudo-terminal device.
- openpty.04
If winp is not NULL, it shall point to a winsize structure used to initialize the window size parameters of the slave pseudo-terminal device.
- openpty.05
On success, zero is returned.
- openpty.06
On error, -1 is returned, and errno is set appropriately.
- openpty.06.01
[ENOENT] There are no available pseudo-terminals.
- [+]posix_openpt (9 / 4 / 0)
- app.posix_openpt.01
Values for oflag are constructed by a bitwise-inclusive OR of flags from the following list, defined in <fcntl.h>:O_RDWR Open for reading and writing. O_NOCTTY If set posix_openpt() shall not cause the terminal device to become the controlling terminal for the process. The behavior of other values for the oflag argument is unspecified.
- posix_openpt.01
Upon successful completion, the posix_openpt() function shall open a master pseudo-terminal device
The posix_openpt() function shall establish a connection between a master device for a pseudo-terminal and a file descriptor.
- posix_openpt.02
The file status flags and file access modes of the open file description shall be set according to the value of oflag.
- posix_openpt.03
and return a non-negative integer representing the lowest numbered unused file descriptor.
- posix_openpt.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- posix_openpt.05
The posix_openpt() function shall fail if:
- posix_openpt.05.01
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- posix_openpt.05.02
[ENFILE] The maximum allowable number of files is currently open in the system.
- posix_openpt.06
The posix_openpt() function may fail if:
- posix_openpt.06.01
[EINVAL] The value of oflag is not valid.
- posix_openpt.06.02
[EAGAIN] Out of pseudo-terminal resources.
- posix_openpt.06.03
[ENOSR] [XSR] Out of STREAMS resources.
- [+]ptsname (3 / 3 / 0)
- app.ptsname.01
The fildes argument is a file descriptor that refers to the master device.
- ptsname.01
Upon successful completion, ptsname() shall return a pointer to a string which is the name of the pseudo-terminal slave device.
The ptsname() function shall return a pointer to a string containing the pathname of the corresponding slave device.
The ptsname() function shall return the name of the slave pseudo-terminal device associated with a master pseudo-terminal device.
- ptsname.02
Upon failure, ptsname() shall return a null pointer.
- ptsname.02.01
This could occur if fildes is an invalid file descriptor
- ptsname.02.02
if the slave device name does not exist in the file system.
- [+]tcdrain (9 / 3 / 0)
- tcdrain.01
The tcdrain() function shall block until all output written to the object referred to by fildes is transmitted.
- tcdrain.02.01
Any attempts to use tcdrain() from a process which is a member of a background process group on a fildes associated with its controlling terminal, shall cause the process group to be sent a SIGTTOU signal.
- tcdrain.02.02
If the calling process is blocking or ignoring SIGTTOU signals, the process shall be allowed to perform the operation, and no signal is sent.
- tcdrain.03
Upon successful completion, 0 shall be returned.
- tcdrain.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcdrain.05
The tcdrain() function shall fail if:
- tcdrain.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcdrain.05.02
[EINTR] A signal interrupted tcdrain().
- tcdrain.05.03
[ENOTTY] The file associated with fildes is not a terminal.
- tcdrain.06
The tcdrain() function may fail if:
- tcdrain.06.01
[EIO] The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.
- [+]tcflow (12 / 6 / 0)
- tcflow.01
The tcflow() function shall suspend or restart transmission or reception of data on the object referred to by fildes, depending on the value of action.
- tcflow.01.01
If action is TCOOFF, output shall be suspended.
- tcflow.01.02
If action is TCOON, suspended output shall be restarted.
- tcflow.01.03
If action is TCIOFF, the system shall transmit a STOP character, which is intended to cause the terminal device to stop transmitting data to the system.
- tcflow.01.04
If action is TCION, the system shall transmit a START character, which is intended to cause the terminal device to start transmitting data to the system.
- tcflow.02.01
Attempts to use tcflow() from a process which is a member of a background process group on a fildes associated with its controlling terminal, shall cause the process group to be sent a SIGTTOU signal.
- tcflow.02.02
If the calling process is blocking or ignoring SIGTTOU signals, the process shall be allowed to perform the operation, and no signal is sent.
- tcflow.03
Upon successful completion, 0 shall be returned.
- tcflow.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcflow.05
The tcflow() function shall fail if:
- tcflow.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcflow.05.02
[EINVAL] The action argument is not a supported value.
- tcflow.05.03
[ENOTTY] The file associated with fildes is not a terminal.
- tcflow.06
The tcflow() function may fail if:
- tcflow.06.01
[EIO] The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.
- [+]tcflush (11 / 5 / 0)
- tcflush.01
Upon successful completion, tcflush() shall discard data written to the object referred to by fildes (an open file descriptor associated with a terminal) but not transmitted, or data received but not read, depending on the value of queue_selector:
- tcflush.01.01
If queue_selector is TCIFLUSH, it shall flush data received but not read.
- tcflush.01.02
If queue_selector is TCOFLUSH, it shall flush data written but not transmitted.
- tcflush.01.03
If queue_selector is TCIOFLUSH, it shall flush both data received but not read and data written but not transmitted.
- tcflush.02.01
Attempts to use tcflush() from a process which is a member of a background process group on a fildes associated with its controlling terminal shall cause the process group to be sent a SIGTTOU signal.
- tcflush.02.02
If the calling process is blocking or ignoring SIGTTOU signals, the process shall be allowed to perform the operation, and no signal is sent.
- tcflush.03
Upon successful completion, 0 shall be returned.
- tcflush.04
Otherwise, -1 shall be returned and errno set to indicate the error
- tcflush.05
The tcflush() function shall fail if:
- tcflush.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcflush.05.02
[EINVAL] The queue_selector argument is not a supported value.
- tcflush.05.03
[ENOTTY] The file associated with fildes is not a terminal.
- tcflush.06
The tcflush() function may fail if:
- tcflush.06.01
[EIO] The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.
- [+]tcgetattr (6 / 2 / 0)
- tcgetattr.01
The tcgetattr() function shall get the parameters associated with the terminal referred to by fildes and store them in the termios structure referenced by termios_p.
- tcgetattr.01.01
If the terminal device supports different input and output baud rates, the baud rates stored in the termios structure returned by tcgetattr() shall reflect the actual baud rates, even if they are equal.
- tcgetattr.01.02
If differing baud rates are not supported, the rate returned as the output baud rate shall be the actual baud rate. If the terminal device does not support split baud rates, the input baud rate stored in the termios structure shall be the output rate (as one of the symbolic values).
- app.tcgetattr.01
The termios_p argument is a pointer to a termios structure.
- tcgetattr.02
Upon successful completion, 0 shall be returned.
- tcgetattr.03
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcgetattr.04
The tcgetattr() function shall fail if:
- tcgetattr.04.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcgetattr.04.02
[ENOTTY] The file associated with fildes is not a terminal.
- [+]tcgetpgrp (6 / 1 / 0)
- tcgetpgrp.01
The tcgetpgrp() function shall return the value of the process group ID of the foreground process group associated with the terminal.
- tcgetpgrp.02
If there is no foreground process group, tcgetpgrp() shall return a value greater than 1 that does not match the process group ID of any existing process group.
- tcgetpgrp.03
Upon successful completion, tcgetpgrp() shall return the value of the process group ID of the foreground process associated with the terminal.
- tcgetpgrp.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcgetpgrp.05
The tcgetpgrp() function shall fail if:
- tcgetpgrp.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcgetpgrp.05.02
[ENOTTY] The calling process does not have a controlling terminal, or the file is not the controlling terminal.
- [+]tcgetsid (5 / 2 / 0)
- tcgetsid.01
The tcgetsid() function shall obtain the process group ID of the session for which the terminal specified by fildes is the controlling terminal.
- tcgetsid.02
Upon successful completion, tcgetsid() shall return the process group ID associated with the terminal.
- tcgetsid.03
Otherwise, a value of (pid_t)-1 shall be returned and errno set to indicate the error.
- tcgetsid.04
The tcgetsid() function shall fail if:
- tcgetsid.04.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcgetsid.04.02
[ENOTTY] The calling process does not have a controlling terminal, or the file is not the controlling terminal.
- [+]tcsendbreak (8 / 2 / 0)
- tcsendbreak.01
If the terminal is using asynchronous serial data transmission, tcsendbreak() shall cause transmission of a continuous stream of zero-valued bits for a specific duration.
- tcsendbreak.02.01
Attempts to use tcsendbreak() from a process which is a member of a background process group on a fildes associated with its controlling terminal shall cause the process group to be sent a SIGTTOU signal.
- tcsendbreak.02.02
If the calling process is blocking or ignoring SIGTTOU signals, the process shall be allowed to perform the operation, and no signal is sent.
- tcsendbreak.03
Upon successful completion, 0 shall be returned.
- tcsendbreak.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcsendbreak.05
The tcsendbreak() function shall fail if:
- tcsendbreak.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcsendbreak.05.02
[ENOTTY] The file associated with fildes is not a terminal.
- tcsendbreak.06
The tcsendbreak() function may fail if:
- tcsendbreak.06.01
[EIO] The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.
- [+]tcsetattr (17 / 9 / 0)
- app.tcsetattr.01
The effect of tcsetattr() is undefined if the value of the termios structure pointed to by termios_p was not derived from the result of a call to tcgetattr() on fildes; an application should modify only fields and flags defined by this volume of IEEE Std 1003.1-2001 between the call to tcgetattr() and tcsetattr(), leaving all other fields and flags unmodified.
- tcsetattr.01
The tcsetattr() function shall set the parameters associated with the terminal referred to by the open file descriptor fildes (an open file descriptor associated with a terminal) from the termios structure referenced by termios_p as follows:
- tcsetattr.01.01
If optional_actions is TCSANOW, the change shall occur immediately.
- tcsetattr.01.02
If optional_actions is TCSADRAIN, the change shall occur after all output written to fildes is transmitted. This function should be used when changing parameters that affect output.
- tcsetattr.01.03
If optional_actions is TCSAFLUSH, the change shall occur after all output written to fildes is transmitted, and all input so far received but not read shall be discarded before the change is made.
- tcsetattr.02
If the output baud rate stored in the termios structure pointed to by termios_p is the zero baud rate, B0, the modem control lines shall no longer be asserted. Normally, this shall disconnect the line.
- tcsetattr.03
If the input baud rate stored in the termios structure pointed to by termios_p is 0, the input baud rate given to the hardware is the same as the output baud rate stored in the termios structure.
- tcsetattr.04
The tcsetattr() function shall return successfully if it was able to perform any of the requested actions, even if some of the requested actions could not be performed. It shall set all the attributes that the implementation supports as requested and leave all the attributes not supported by the implementation unchanged.
- tcsetattr.05
If the input and output baud rates differ and are a combination that is not supported, neither baud rate shall be changed.
- tcsetattr.06
The tcsetattr() function shall not change the values found in the termios structure under any circumstances.
- tcsetattr.07
If tcsetattr() is called from a process which is a member of a background process group on a fildes associated with its controlling terminal:
- tcsetattr.07.01
If the calling process is blocking or ignoring SIGTTOU signals, the operation completes normally and no signal is sent.
- tcsetattr.07.02
Otherwise, a SIGTTOU signal shall be sent to the process group.
- tcsetattr.08
Upon successful completion, 0 shall be returned.
- tcsetattr.09
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcsetattr.10
The tcsetattr() function shall fail if:
- tcsetattr.10.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcsetattr.10.02
[EINTR] A signal interrupted tcsetattr().
- tcsetattr.10.03
[EINVAL] The optional_actions argument is not a supported value, or an attempt was made to change an attribute represented in the termios structure to an unsupported value.
If no part of the request can be honored, it shall return -1 and set errno to [EINVAL].
- tcsetattr.10.04
[ENOTTY] The file associated with fildes is not a terminal.
- tcsetattr.11
The tcsetattr() function may fail if:
- tcsetattr.11.01
[EIO] The process group of the writing process is orphaned, and the writing process is not ignoring or blocking SIGTTOU.
- [+]tcsetpgrp (8 / 2 / 0)
- tcsetpgrp.01
If the process has a controlling terminal, tcsetpgrp() shall set the foreground process group ID associated with the terminal to pgid_id.
- tcsetpgrp.02.01
If the calling process is blocking or ignoring SIGTTOU signals, the process shall be allowed to perform the operation, and no signal is sent.
Attempts to use tcsetpgrp() from a process which is a member of a background process group on a fildes associated with its controlling terminal shall cause the process group to be sent a SIGTTOU signal.
- tcsetpgrp.03
Upon successful completion, 0 shall be returned.
- tcsetpgrp.04
Otherwise, -1 shall be returned and errno set to indicate the error.
- tcsetpgrp.05
The tcsetpgrp() function shall fail if:
- tcsetpgrp.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- tcsetpgrp.05.02
[EINVAL] This implementation does not support the value in the pgid_id argument.
- tcsetpgrp.05.03
[ENOTTY] The calling process does not have a controlling terminal, or the file is not the controlling terminal, or the controlling terminal is no longer associated with the session of the calling process.
- tcsetpgrp.05.04
[EPERM] The value of pgid_id is a value supported by the implementation, but does not match the process group ID of a process in the same session as the calling process.
- [+]ttyname (6 / 4 / 0)
- ttyname.01
The ttyname() function shall return a pointer to a string containing a null-terminated pathname of the terminal associated with file descriptor fildes.
- ttyname.02
The maximum length of the terminal name shall be {TTY_NAME_MAX}.
- ttyname.03
Upon successful completion, ttyname() shall return a pointer to a string.
- ttyname.04
Otherwise, a null pointer shall be returned and errno set to indicate the error.
- ttyname.05
The ttyname() function may fail if:
- ttyname.05.01
[EBADF] The fildes argument is not a valid file descriptor.
- ttyname.05.02
[ENOTTY] The fildes argument does not refer to a terminal.
- [+]ttyname_r (7 / 4 / 0)
- ttyname_r.01
The ttyname_r() function shall store the null-terminated pathname of the terminal associated with the file descriptor fildes in the character array referenced by name.
- app.ttyname_r.01
The array is namesize characters long and should have space for the name and the terminating null character.
- ttyname_r.02
The maximum length of the terminal name shall be {TTY_NAME_MAX}.
- ttyname_r.03
If successful, the ttyname_r() function shall return zero.
- ttyname_r.04
Otherwise, an error number shall be returned to indicate the error.
- ttyname_r.05
The ttyname_r() function may fail if:
- ttyname_r.05.01
[EBADF] [TSF] The fildes argument is not a valid file descriptor.
- ttyname_r.05.02
[ENOTTY] [TSF] The fildes argument does not refer to a terminal.
- ttyname_r.05.03
[ERANGE] [TSF] The value of namesize is smaller than the length of the string to be returned including the terminating null character.
- [+]unlockpt (5 / 3 / 0)
- unlockpt.01
The unlockpt() function shall unlock the slave pseudo-terminal device associated with the master to which fildes refers.
- unlockpt.02
Upon successful completion, unlockpt() shall return 0.
- unlockpt.03
Otherwise, it shall return -1 and set errno to indicate the error.
- unlockpt.04
The unlockpt() function may fail if:
- unlockpt.04.01
[EBADF] The fildes argument is not a file descriptor open for writing.
- unlockpt.04.02
[EINVAL] The fildes argument is not associated with a master pseudo-terminal device.
- [+]locale.collate (10 / 6 / 0)
- [+]strcoll (4 / 2 / 0)
- strcoll.01
The strcoll() function shall compare the string pointed to by s1 to the string pointed to by s2, both interpreted as appropriate to the LC_COLLATE category of the current locale.
- strcoll.01.01
Upon successful completion, strcoll() shall return an integer greater than, equal to, or less than 0, according to whether the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2 when both are interpreted as appropriate to the current locale.
- strcoll.02
The strcoll() function shall not change the setting of errno if successful.
- app.strcoll.03
Since no return value is reserved to indicate an error, an application wishing to check for error situations should set errno to 0, then call strcoll(), then check errno.
- strcoll.04
[CX] On error, strcoll() may set errno, but no return value is reserved to indicate an error.
- strcoll.05
The strcoll() function may fail if:
- strcoll.05.01
[EINVAL] [CX] The s1 or s2 arguments contain characters outside the domain of the collating sequence.
- [+]strxfrm (6 / 4 / 0)
- strxfrm.01
The strxfrm() function shall transform the string pointed to by s2 and place the resulting string into the array pointed to by s1. The transformation is such that if strcmp() is applied to two transformed strings, it shall return a value greater than, equal to, or less than 0, corresponding to the result of strcoll() applied to the same two original strings.
- strxfrm.02
No more than n bytes are placed into the resulting array pointed to by s1, including the terminating null byte.
- app.strxfrm.03
If n is 0, s1 is permitted to be a null pointer.
- app.strxfrm.04
If copying takes place between objects that overlap, the behavior is undefined.
- strxfrm.05
The strxfrm() function shall not change the setting of errno if successful.
- app.strxfrm.06
Since no return value is reserved to indicate an error, an application wishing to check for error situations should set errno to 0, then call strxfrm(), then check errno.
- strxfrm.07
Upon successful completion, strxfrm() shall return the length of the transformed string (not including the terminating null byte).
- strxfrm.08 (struct)
If the value returned is n or more, the contents of the array pointed to by s1 are unspecified.
- strxfrm.09
[CX] On error, strxfrm() may set errno but no return value is reserved to indicate an error.
- strxfrm.10
The strxfrm() function may fail if:
- strxfrm.10.01
[EINVAL] [CX] The string pointed to by the s2 argument contains characters outside the domain of the collating sequence.
- [+]locale.ctrans (18 / 8 / 0)
- [+]__ctype_tolower_loc (5 / 1 / 0)
- __ctype_tolower_loc.01
The __ctype_tolower_loc() function shall return a pointer into an array of characters in the current locale that contains lower case equivalents for each character in the current character set.
- __ctype_tolower_loc.02
The array shall contain a total of 384 characters,
- __ctype_tolower_loc.03
and can be indexed with any signed or unsigned char (i.e. with an index value between -128 and 255).
- __ctype_tolower_loc.04
If the application is multithreaded, the array shall be local to the current thread.
- __ctype_tolower_loc.05
The __ctype_tolower_loc() function shall return a pointer to the array of characters to be used for the ctype() family of functions (see <ctype.h>).
- [+]__ctype_toupper_loc (5 / 1 / 0)
- __ctype_toupper_loc.01
The __ctype_toupper_loc() function shall return a pointer into an array of characters in the current locale that contains upper case equivalents for each character in the current character set.
- __ctype_toupper_loc.02
The array shall contain a total of 384 characters,
- __ctype_toupper_loc.03
and can be indexed with any signed or unsigned char (i.e. with an index value between -128 and 255).
- __ctype_toupper_loc.04
If the application is multithreaded, the array shall be local to the current thread.
- __ctype_toupper_loc.05
The __ctype_toupper_loc() function shall return a pointer to the array of characters to be used for the ctype() family of functions (see <ctype.h>).
- [+]_tolower (2 / 1 / 0)
- _tolower.01
The _tolower() macro shall be equivalent to tolower(c)
- app._tolower.02
except that the application shall ensure that the argument c is an uppercase letter.
- _tolower.03
Upon successful completion, _tolower() shall return the lowercase letter corresponding to the argument passed.
- [+]_toupper (2 / 1 / 0)
- _toupper.01
The _toupper() macro shall be equivalent to toupper()
- app._toupper.02
except that the application shall ensure that the argument c is a lowercase letter.
- _toupper.03
Upon successful completion, _toupper() shall return the uppercase letter corresponding to the argument passed.
- [+]tolower (2 / 2 / 0)
- app.tolower.01
The tolower() function has as a domain a type int, the value of which is representable as an unsigned char or the value of EOF. If the argument has any other value, the behavior is undefined.
- tolower.02
If the argument of tolower() represents an uppercase letter, and there exists a corresponding lowercase letter [CX] (as defined by character type information in the program locale category LC_CTYPE ), the result shall be the corresponding lowercase letter.
- tolower.02.01
Upon successful completion, tolower() shall return the lowercase letter corresponding to the argument passed;
- tolower.03
All other arguments in the domain are returned unchanged.
- tolower.03.01
otherwise, it shall return the argument unchanged.
- [+]toupper (2 / 2 / 0)
- app.toupper.01
The toupper() function has as a domain a type int, the value of which is representable as an unsigned char or the value of EOF. If the argument has any other value, the behavior is undefined.
- toupper.02
If the argument of toupper() represents a lowercase letter, and there exists a corresponding uppercase letter [CX] (as defined by character type information in the program locale category LC_CTYPE ), the result shall be the corresponding uppercase letter.
- toupper.02.01
Upon successful completion, toupper() shall return the uppercase letter corresponding to the argument passed.
- toupper.03
All other arguments in the domain are returned unchanged.
- [+]locale.ctype (30 / 14 / 0)
- [+]__ctype_b_loc (3 / 2 / 0)
- __ctype_b_loc.01
The __ctype_b_loc() function shall return a pointer into an array of characters in the current locale that contains characteristics for each character in the current character set.
- __ctype_b_loc.02
The array shall contain a total of 384 characters, and can be indexed with any signed or unsigned char (i.e. with an index value between -128 and 255).
- __ctype_b_loc.03
If the application is multithreaded, the array shall be local to the current thread.
- [+]__ctype_get_mb_cur_max (1 / 0 / 0)
- __ctype_get_mb_cur_max.01
__ctype_get_mb_cur_max() returns the maximum length of a multibyte character in the current locale.
- [+]isalnum (2 / 1 / 0)
- isalnum.01
The isalnum() function shall test whether c is a character of class alpha or digit in the program's current locale
- isalnum.01.01
The isalnum() function shall return non-zero if c is an alphanumeric character
- isalnum.01.02
otherwise, it shall return 0.
- app.isalnum.02
The c argument is an int, the value of which the application shall ensure is representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isalpha (2 / 1 / 0)
- isalpha.01
The isalpha() function shall test whether c is a character of class alpha in the program's current locale
- isalpha.01.01
The isalpha() function shall return non-zero if c is an alphabetic character
- isalpha.01.02
otherwise, it shall return 0.
- app.isalpha.02
The c argument is an int, the value of which the application shall ensure is representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isascii (2 / 2 / 0)
- isascii.01
The isascii() function shall test whether c is a 7-bit US-ASCII character code.
- isascii.01.01
The isascii() function shall return non-zero if c is a 7-bit US-ASCII character code between 0 and octal 0177 inclusive
- isascii.01.02
otherwise, it shall return 0.
- app.isascii.02
The isascii() function is defined on all integer values.
- [+]isblank (2 / 1 / 0)
- isblank.01
The isblank() function shall test whether c is a character of class blank in the program's current locale
- isblank.01.01
The isblank() function shall return non-zero if c is a <blank>
- isblank.01.02
otherwise, it shall return 0.
- app.isblank.02
The c argument is a type int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]iscntrl (2 / 0 / 0)
- iscntrl.01
The iscntrl() function shall test whether c is a character of class cntrl in the program's current locale
- iscntrl.01.01
The iscntrl() function shall return non-zero if c is a control character
- iscntrl.01.02
otherwise, it shall return 0.
- app.iscntrl.02
The c argument is a type int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isdigit (2 / 1 / 0)
- isdigit.01
The isdigit() function shall test whether c is a character of class digit in the program's current locale
- isdigit.01.01
The isdigit() function shall return non-zero if c is a decimal digit
- isdigit.01.02
otherwise, it shall return 0.
- app.isdigit.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isgraph (2 / 1 / 0)
- isgraph.01
The isgraph() function shall test whether c is a character of class graph in the program's current locale
- isgraph.01.01
The isgraph() function shall return non-zero if c is a character with a visible representation
- isgraph.01.02
otherwise, it shall return 0.
- app.isgraph.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]islower (2 / 1 / 0)
- islower.01
The islower() function shall test whether c is a character of class lower in the program's current locale
- islower.01.01
The islower() function shall return non-zero if c is a lowercase letter
- islower.01.02
otherwise, it shall return 0.
- app.islower.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isprint (2 / 1 / 0)
- isprint.01
The isprint() function shall test whether c is a character of class print in the program's current locale
- isprint.01.01
The isprint() function shall return non-zero if c is a printable character
- isprint.01.02
otherwise, it shall return 0.
- app.isprint.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]ispunct (2 / 0 / 0)
- ispunct.01
The ispunct() function shall test whether c is a character of class punct in the program's current locale
- ispunct.01.01
The ispunct() function shall return non-zero if c is a punctuation character
- ispunct.01.02
otherwise, it shall return 0.
- app.ispunct.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isspace (2 / 1 / 0)
- isspace.01
The isspace() function shall test whether c is a character of class space in the program's current locale
- isspace.01.01
The isspace() function shall return non-zero if c is a white-space character
- isspace.01.02
otherwise, it shall return 0.
- app.isspace.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isupper (2 / 1 / 0)
- isupper.01
The isupper() function shall test whether c is a character of class upper in the program's current locale
- isupper.01.01
The isupper() function shall return non-zero if c is an uppercase letter
- isupper.01.02
otherwise, it shall return 0.
- app.isupper.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]isxdigit (2 / 1 / 0)
- isxdigit.01
The isxdigit() function shall test whether c is a character of class xdigit in the program's current locale
- isxdigit.01.01
The isxdigit() function shall return non-zero if c is a hexadecimal digit
- isxdigit.01.02
otherwise, it shall return 0.
- app.isxdigit.02
The c argument is an int, the value of which the application shall ensure is a character representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
- [+]locale.iconv (36 / 10 / 0)
- [+]iconv (21 / 6 / 0)
- iconv.01
The iconv() function shall convert the sequence of characters from one codeset, in the array specified by inbuf, into a sequence of corresponding characters in another codeset, in the array specified by outbuf. The codesets are those specified in the iconv_open() call that returned the conversion descriptor, cd.
- app.iconv.02
The inbuf argument points to a variable that points to the first character in the input buffer
- app.iconv.03
inbytesleft indicates the number of bytes to the end of the buffer to be converted.
- app.iconv.04
The outbuf argument points to a variable that points to the first available byte in the output buffer
- app.iconv.05
outbytesleft indicates the number of the available bytes to the end of the buffer.
- iconv.06
For state-dependent encodings, the conversion descriptor cd is placed into its initial shift state by a call for which inbuf is a null pointer, or for which inbuf points to a null pointer.
- iconv.07
When iconv() is called in this way, and if outbuf is not a null pointer or a pointer to a null pointer, and outbytesleft points to a positive value, iconv() shall place, into the output buffer, the byte sequence to change the output buffer to its initial shift state.
- iconv.08
If the output buffer is not large enough to hold the entire reset sequence, iconv() shall fail and set errno to [E2BIG].
- iconv.09
Subsequent calls with inbuf as other than a null pointer or a pointer to a null pointer cause the conversion to take place from the current state of the conversion descriptor.
- iconv.10
If a sequence of input bytes does not form a valid character in the specified codeset, conversion shall stop after the previous successfully converted character.
- iconv.11
If the input buffer ends with an incomplete character or shift sequence, conversion shall stop after the previous successfully converted bytes.
- iconv.12
If the output buffer is not large enough to hold the entire converted input, conversion shall stop just prior to the input bytes that would cause the output buffer to overflow.
- iconv.13
The variable pointed to by inbuf shall be updated to point to the byte following the last byte successfully used in the conversion.
- iconv.14
The value pointed to by inbytesleft shall be decremented to reflect the number of bytes still not converted in the input buffer.
- iconv.15
The variable pointed to by outbuf shall be updated to point to the byte following the last byte of converted output data.
- iconv.16
The value pointed to by outbytesleft shall be decremented to reflect the number of bytes still available in the output buffer.
- iconv.17
For state-dependent encodings, the conversion descriptor shall be updated to reflect the shift state in effect at the end of the last successfully converted byte sequence.
- iconv.19
The iconv() function shall update the variables pointed to by the arguments to reflect the extent of the conversion and return the number of non-identical conversions performed.
- iconv.20
If the entire string in the input buffer is converted, the value pointed to by inbytesleft shall be 0.
- iconv.21
If the input conversion is stopped due to any conditions mentioned above, the value pointed to by inbytesleft shall be non-zero and errno shall be set to indicate the condition.
- iconv.22
If an error occurs, iconv() shall return (size_t)-1 and set errno to indicate the error.
- iconv.23
The iconv() function shall fail if:
- iconv.23.01
[EILSEQ] Input conversion stopped due to an input byte that does not belong to the input codeset.
- iconv.23.02
[E2BIG] Input conversion stopped due to lack of space in the output buffer.
- iconv.23.03
[EINVAL] Input conversion stopped due to an incomplete character or shift sequence at the end of the input buffer.
- iconv.24
The iconv() function may fail if:
- iconv.24.01
[EBADF] The cd argument is not a valid open conversion descriptor.
- [+]iconv_close (5 / 3 / 0)
- iconv_close.01
The iconv_close() function shall deallocate the conversion descriptor cd and all other associated resources allocated by iconv_open().
- iconv_close.02
If a file descriptor is used to implement the type iconv_t, that file descriptor shall be closed.
- iconv_close.03
Upon successful completion, 0 shall be returned;
- iconv_close.04
otherwise, -1 shall be returned and errno set to indicate the error.
- iconv_close.05
The iconv_close() function may fail if:
- iconv_close.05.01
[EBADF] The conversion descriptor is invalid.
- [+]iconv_open (10 / 1 / 0)
- iconv_open.01
The iconv_open() function shall return a conversion descriptor that describes a conversion from the codeset specified by the string pointed to by the fromcode argument to the codeset specified by the string pointed to by the tocode argument.
- iconv_open.02
For state-dependent encodings, the conversion descriptor shall be in a codeset-dependent initial shift state, ready for immediate use with iconv().
- iconv_open.03
A conversion descriptor shall remain valid until it is closed by iconv_close() or an implicit close
- iconv_open.04
If a file descriptor is used to implement conversion descriptors, the FD_CLOEXEC flag shall be set; see <fcntl.h>.
- iconv_open.05
Upon successful completion, iconv_open() shall return a conversion descriptor for use on subsequent calls to iconv().
- iconv_open.06
Otherwise, iconv_open() shall return (iconv_t)-1 and set errno to indicate the error.
- iconv_open.07
The iconv_open() function may fail if:
- iconv_open.07.01
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- iconv_open.07.02
[ENFILE] Too many files are currently open in the system.
- iconv_open.07.03
[ENOMEM] Insufficient storage space is available.
- iconv_open.07.04
[EINVAL] The conversion specified by fromcode and tocode is not supported by the implementation.
- [+]locale.locale (115 / 0 / 0)
- [+]duplocale (4 / 0 / 0)
- duplocale.01
The duplocale() function shall provide a new locale object based on the locale object provided in locale, suitable for use in the newlocale() or uselocale() functions.
- app.duplocale.02
The new object may be released by calling freelocale().
- duplocale.03
On success, the duplocale() function shall return a locale object.
- duplocale.04
Otherwise, it shall return NULL, and set errno to indicate the error.
- duplocale.05
The duplocale() function shall fail if:
- duplocale.05.01
[ENOMEM] Insufficient memory.
- [+]freelocale (1 / 0 / 0)
- freelocale.01
The freelocale() function shall free the locale object locale, and release any resources associated with it.
- [+]localeconv (79 / 0 / 0)
- localeconv.01 (struct)
The localeconv() function shall set the components of an object with the type struct lconv with the values appropriate for the formatting of numeric quantities (monetary and otherwise) according to the rules of the current locale.
- localeconv.02
The members of the structure with type char * are pointers to strings, any of which (except decimal_point) can point to "", to indicate that the value is not available in the current locale or is of zero length.
- localeconv.02.01
char *decimal_point The radix character used to format non-monetary quantities.
- localeconv.02.02
char *thousands_sep The character used to separate groups of digits before the decimal-point character in formatted non-monetary quantities.
- localeconv.02.03
char *grouping A string whose elements taken as one-byte integer values indicate the size of each group of digits in formatted non-monetary quantities.
- localeconv.02.04
char *int_curr_symbol The international currency symbol applicable to the current locale. The first three characters contain the alphabetic international currency symbol in accordance with those specified in the ISO 4217:2001 standard. The fourth character (immediately preceding the null byte) is the character used to separate the international currency symbol from the monetary quantity.
- localeconv.02.05
char *currency_symbol The local currency symbol applicable to the current locale.
- localeconv.02.06
char *mon_decimal_point The radix character used to format monetary quantities.
- localeconv.02.07
char *mon_thousands_sep The separator for groups of digits before the decimal-point in formatted monetary quantities.
- localeconv.02.08
char *mon_grouping A string whose elements taken as one-byte integer values indicate the size of each group of digits in formatted monetary quantities.
- localeconv.02.09
char *positive_sign The string used to indicate a non-negative valued formatted monetary quantity.
- localeconv.02.10
char *negative_sign The string used to indicate a negative valued formatted monetary quantity.
- localeconv.03
The members with type char are non-negative numbers, any of which can be {CHAR_MAX} to indicate that the value is not available in the current locale.
- localeconv.03.01
char int_frac_digits The number of fractional digits (those after the decimal-point) to be displayed in an internationally formatted monetary quantity.
- localeconv.03.02
char frac_digits The number of fractional digits (those after the decimal-point) to be displayed in a formatted monetary quantity.
- localeconv.03.03
char p_cs_precedes Set to 1 if the currency_symbol precedes the value for a non-negative formatted monetary quantity. Set to 0 if the symbol succeeds the value.
- localeconv.03.04
char p_sep_by_space Set to a value indicating the separation of the currency_symbol, the sign string, and the value for a non-negative formatted monetary quantity.
- localeconv.03.05
char n_cs_precedes Set to 1 if the currency_symbol precedes the value for a negative formatted monetary quantity. Set to 0 if the symbol succeeds the value.
- localeconv.03.06
char n_sep_by_space Set to a value indicating the separation of the currency_symbol, the sign string, and the value for a negative formatted monetary quantity.
- localeconv.03.07
char p_sign_posn Set to a value indicating the positioning of the positive_sign for a non-negative formatted monetary quantity.
- localeconv.03.08
char n_sign_posn Set to a value indicating the positioning of the negative_sign for a negative formatted monetary quantity.
- localeconv.03.09
char int_p_cs_precedes Set to 1 or 0 if the int_curr_symbol respectively precedes or succeeds the value for a non-negative internationally formatted monetary quantity.
- localeconv.03.10
char int_n_cs_precedes Set to 1 or 0 if the int_curr_symbol respectively precedes or succeeds the value for a negative internationally formatted monetary quantity.
- localeconv.03.11
char int_p_sep_by_space Set to a value indicating the separation of the int_curr_symbol, the sign string, and the value for a non-negative internationally formatted monetary quantity.
- localeconv.03.12
char int_n_sep_by_space Set to a value indicating the separation of the int_curr_symbol, the sign string, and the value for a negative internationally formatted monetary quantity.
- localeconv.03.13
char int_p_sign_posn Set to a value indicating the positioning of the positive_sign for a non-negative internationally formatted monetary quantity.
- localeconv.03.14
char int_n_sign_posn Set to a value indicating the positioning of the negative_sign for a negative internationally formatted monetary quantity.
- localeconv.04
The members include the following:
- localeconv.04.01
char *decimal_point The radix character used to format non-monetary quantities.
- localeconv.04.02
char *thousands_sep The character used to separate groups of digits before the decimal-point character in formatted non-monetary quantities.
- localeconv.04.03
char *grouping A string whose elements taken as one-byte integer values indicate the size of each group of digits in formatted non-monetary quantities.
- localeconv.04.03.01
The elements of grouping and mon_grouping are interpreted according to the following:
- localeconv.04.03.01.01
{CHAR_MAX} No further grouping is to be performed.
- localeconv.04.03.01.02
0 The previous element is to be repeatedly used for the remainder of the digits.
- localeconv.04.03.01.03
other The integer value is the number of digits that comprise the current group. The next element is examined to determine the size of the next group of digits before the current group.
- localeconv.04.04
char *int_curr_symbol The international currency symbol applicable to the current locale. The first three characters contain the alphabetic international currency symbol in accordance with those specified in the ISO 4217:2001 standard. The fourth character (immediately preceding the null byte) is the character used to separate the international currency symbol from the monetary quantity.
- localeconv.04.05
char *currency_symbol The local currency symbol applicable to the current locale.
- localeconv.04.06
char *mon_decimal_point The radix character used to format monetary quantities.
- localeconv.04.07
char *mon_thousands_sep The separator for groups of digits before the decimal-point in formatted monetary quantities.
- localeconv.04.08
char *mon_grouping A string whose elements taken as one-byte integer values indicate the size of each group of digits in formatted monetary quantities.
- localeconv.04.08.01
The elements of grouping and mon_grouping are interpreted according to the following:
- localeconv.04.08.01.01
{CHAR_MAX} No further grouping is to be performed.
- localeconv.04.08.01.02
0 The previous element is to be repeatedly used for the remainder of the digits.
- localeconv.04.08.01.03
other The integer value is the number of digits that comprise the current group. The next element is examined to determine the size of the next group of digits before the current group.
- localeconv.04.09
char *positive_sign The string used to indicate a non-negative valued formatted monetary quantity.
- localeconv.04.10
char *negative_sign The string used to indicate a negative valued formatted monetary quantity.
- localeconv.04.11
char int_frac_digits The number of fractional digits (those after the decimal-point) to be displayed in an internationally formatted monetary quantity.
- localeconv.04.12
char frac_digits The number of fractional digits (those after the decimal-point) to be displayed in a formatted monetary quantity.
- localeconv.04.13
char p_cs_precedes Set to 1 if the currency_symbol precedes the value for a non-negative formatted monetary quantity. Set to 0 if the symbol succeeds the value.
- localeconv.04.14
char p_sep_by_space Set to a value indicating the separation of the currency_symbol, the sign string, and the value for a non-negative formatted monetary quantity.
- localeconv.04.14.01
The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, and int_n_sep_by_space are interpreted according to the following:
- localeconv.04.14.01.01
0 No space separates the currency symbol and value.
- localeconv.04.14.01.02
1 If the currency symbol and sign string are adjacent, a space separates them from the value; otherwise, a space separates the currency symbol from the value.
- localeconv.04.14.01.03
2 If the currency symbol and sign string are adjacent, a space separates them; otherwise, a space separates the sign string from the value.
- localeconv.04.15
char n_cs_precedes Set to 1 if the currency_symbol precedes the value for a negative formatted monetary quantity. Set to 0 if the symbol succeeds the value.
- localeconv.04.16
char n_sep_by_space Set to a value indicating the separation of the currency_symbol, the sign string, and the value for a negative formatted monetary quantity.
- localeconv.04.16.01
The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, and int_n_sep_by_space are interpreted according to the following:
- localeconv.04.16.01.01
0 No space separates the currency symbol and value.
- localeconv.04.16.01.02
1 If the currency symbol and sign string are adjacent, a space separates them from the value; otherwise, a space separates the currency symbol from the value.
- localeconv.04.16.01.03
2 If the currency symbol and sign string are adjacent, a space separates them; otherwise, a space separates the sign string from the value.
- localeconv.04.17
char p_sign_posn Set to a value indicating the positioning of the positive_sign for a non-negative formatted monetary quantity.
- localeconv.04.17.01
The values of p_sign_posn, n_sign_posn, int_p_sign_posn, and int_n_sign_posn are interpreted according to the following:
- localeconv.04.17.01.01
0 Parentheses surround the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.17.01.02
1 The sign string precedes the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.17.01.03
2 The sign string succeeds the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.17.01.04
3 The sign string immediately precedes the currency_symbol or int_curr_symbol.
- localeconv.04.17.01.05
4 The sign string immediately succeeds the currency_symbol or int_curr_symbol.
- localeconv.04.18
char n_sign_posn Set to a value indicating the positioning of the negative_sign for a negative formatted monetary quantity.
- localeconv.04.18.01
The values of p_sign_posn, n_sign_posn, int_p_sign_posn, and int_n_sign_posn are interpreted according to the following:
- localeconv.04.18.01.01
0 Parentheses surround the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.18.01.02
1 The sign string precedes the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.18.01.03
2 The sign string succeeds the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.18.01.04
3 The sign string immediately precedes the currency_symbol or int_curr_symbol.
- localeconv.04.18.01.05
4 The sign string immediately succeeds the currency_symbol or int_curr_symbol.
- localeconv.04.19
char int_p_cs_precedes Set to 1 or 0 if the int_curr_symbol respectively precedes or succeeds the value for a non-negative internationally formatted monetary quantity.
- localeconv.04.20
char int_n_cs_precedes Set to 1 or 0 if the int_curr_symbol respectively precedes or succeeds the value for a negative internationally formatted monetary quantity.
- localeconv.04.21
char int_p_sep_by_space Set to a value indicating the separation of the int_curr_symbol, the sign string, and the value for a non-negative internationally formatted monetary quantity.
- localeconv.04.21.01
The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, and int_n_sep_by_space are interpreted according to the following:
- localeconv.04.21.01.01
0 No space separates the currency symbol and value.
- localeconv.04.21.01.02
1 If the currency symbol and sign string are adjacent, a space separates them from the value; otherwise, a space separates the currency symbol from the value.
- localeconv.04.21.01.03
2 If the currency symbol and sign string are adjacent, a space separates them; otherwise, a space separates the sign string from the value.
- localeconv.04.21.02
For int_p_sep_by_space and int_n_sep_by_space, the fourth character of int_curr_symbol is used instead of a space.
- localeconv.04.22
char int_n_sep_by_space Set to a value indicating the separation of the int_curr_symbol, the sign string, and the value for a negative internationally formatted monetary quantity.
- localeconv.04.22.01
The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, and int_n_sep_by_space are interpreted according to the following:
- localeconv.04.22.01.01
0 No space separates the currency symbol and value.
- localeconv.04.22.01.02
1 If the currency symbol and sign string are adjacent, a space separates them from the value; otherwise, a space separates the currency symbol from the value.
- localeconv.04.22.01.03
2 If the currency symbol and sign string are adjacent, a space separates them; otherwise, a space separates the sign string from the value.
- localeconv.04.22.02
For int_p_sep_by_space and int_n_sep_by_space, the fourth character of int_curr_symbol is used instead of a space.
- localeconv.04.23
char int_p_sign_posn Set to a value indicating the positioning of the positive_sign for a non-negative internationally formatted monetary quantity.
- localeconv.04.23.01
The values of p_sign_posn, n_sign_posn, int_p_sign_posn, and int_n_sign_posn are interpreted according to the following:
- localeconv.04.23.01.01
0 Parentheses surround the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.23.01.02
1 The sign string precedes the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.23.01.03
2 The sign string succeeds the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.23.01.04
3 The sign string immediately precedes the currency_symbol or int_curr_symbol.
- localeconv.04.23.01.05
4 The sign string immediately succeeds the currency_symbol or int_curr_symbol.
- localeconv.04.24
char int_n_sign_posn Set to a value indicating the positioning of the negative_sign for a negative internationally formatted monetary quantity.
- localeconv.04.24.01
The values of p_sign_posn, n_sign_posn, int_p_sign_posn, and int_n_sign_posn are interpreted according to the following:
- localeconv.04.24.01.01
0 Parentheses surround the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.24.01.02
1 The sign string precedes the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.24.01.03
2 The sign string succeeds the quantity and currency_symbol or int_curr_symbol.
- localeconv.04.24.01.04
3 The sign string immediately precedes the currency_symbol or int_curr_symbol.
- localeconv.04.24.01.05
4 The sign string immediately succeeds the currency_symbol or int_curr_symbol.
- localeconv.06
The localeconv() function shall return a pointer to the filled-in object.
- [+]newlocale (8 / 0 / 0)
- newlocale.01
The newlocale() function shall initialize a locale object.
- newlocale.02
If base is NULL, then newlocale() shall first allocate the object;
- newlocale.03
otherwise it shall use the locale object referenced by base.
- newlocale.04
The object shall be initialized for the locale named by locale, and for the categories selected in category_mask.
- app.newlocale.05
The category_mask value is a bitwise inclusive OR of the required LC_name_MASK values, or the value LC_ALL_MASK.
- newlocale.06
On success, the newlocale() function shall return the initialized locale object.
- newlocale.07
Otherwise, it shall return NULL, and set errno to indicate the error.
- newlocale.08
The newlocale() function shall fail if:
- newlocale.08.01
[ENOMEM] Insufficient memory.
- newlocale.08.02
[EINVAL] An invalid category_mask was provided, or the locale was NULL.
- [+]nl_langinfo (3 / 0 / 0)
- nl_langinfo.01
The nl_langinfo() function shall return a pointer to a string containing information relevant to the particular language or cultural area defined in the program's locale (see <langinfo.h>). The manifest constant names and values of item are defined in <langinfo.h>.
- nl_langinfo.03
In a locale where langinfo data is not defined, nl_langinfo() shall return a pointer to the corresponding string in the POSIX locale.
- nl_langinfo.04
In all locales, nl_langinfo() shall return a pointer to an empty string if item contains an invalid setting.
- [+]setlocale (16 / 0 / 0)
- setlocale.01
The setlocale() function selects the appropriate piece of the program's locale, as specified by the category and locale arguments, and may be used to change or query the program's entire locale or portions thereof.
- setlocale.02
other values for category name only a part of the program's locale:
- setlocale.02.01
The value LC_ALL for category names the program's entire locale;
- setlocale.02.02
LC_COLLATE Affects the behavior of regular expressions and the collation functions.
- setlocale.02.03
LC_CTYPE Affects the behavior of regular expressions, character classification, character conversion functions, and wide-character functions.
- setlocale.02.04
LC_MESSAGES [CX] Affects what strings are expected by commands and utilities as affirmative or negative responses. [XSI] It also affects what strings are given by commands and utilities as affirmative or negative responses, and the content of messages.
- setlocale.02.05
LC_MONETARY Affects the behavior of functions that handle monetary values.
- setlocale.02.06
LC_NUMERIC Affects the behavior of functions that handle numeric values.
- setlocale.02.07
LC_TIME Affects the behavior of the time conversion functions.
- app.setlocale.03
The locale argument is a pointer to a character string containing the required setting of category. The contents of this string are implementation-defined. In addition, the following preset values of locale are defined for all settings of category:
- app.setlocale.03.01
"POSIX" [CX] Specifies the minimal environment for C-language translation called the POSIX locale. If setlocale() is not invoked, the POSIX locale is the default at entry to main().
- app.setlocale.03.02
"C" Equivalent to "POSIX".
- app.setlocale.03.03
"" Specifies an implementation-defined native environment. [CX] The determination of the name of the new locale for the specified category depends on the value of the associated environment variables, LC_* and LANG ; see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 7, Locale and the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment Variables.
- app.setlocale.03.04
A null pointer Used to direct setlocale() to query the current internationalized environment and return the name of the locale.
- setlocale.04
Setting all of the categories of the locale of the process is similar to successively setting each individual category of the locale of the process, except that all error checking is done before any actions are performed. To set all the categories of the locale of the process, setlocale() is invoked as:
setlocale(LC_ALL, "");
- setlocale.04.01
In this case, setlocale() shall first verify that the values of all the environment variables it needs according to the precedence rules (described in the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment Variables) indicate supported locales. If the value of any of these environment variable searches yields a locale that is not supported (and non-null), setlocale() shall return a null pointer and the locale of the process shall not be changed.
- setlocale.04.02
If all environment variables name supported locales, setlocale() shall proceed as if it had been called for each category, using the appropriate value from the associated environment variable or from the implementation-defined default if there is no such value.
- setlocale.08
The locale state is common to all threads within a process.
- setlocale.09
Upon successful completion, setlocale() shall return the string associated with the specified category for the new locale.
- setlocale.10
Otherwise, setlocale() shall return a null pointer and the program's locale is not changed.
- setlocale.11.1
A null pointer for locale causes setlocale() to return a pointer to the string associated with the category for the program's current locale.
- setlocale.11.2
The program's locale shall not be changed.
- setlocale.12
The string returned by setlocale() is such that a subsequent call with that string and its associated category shall restore that part of the program's locale.
- [+]uselocale (4 / 0 / 0)
- uselocale.01
The uselocale() function shall set the locale for the calling thread to the locale specified by newloc.
- uselocale.02
If newloc is the value LC_GLOBAL_LOCALE, the thread's locale shall be set to the process current global locale, as set by setlocale().
- uselocale.03
If newloc is NULL, the thread's locale is not altered.
- uselocale.04
The uselocale() function shall return the previous locale, or LC_GLOBAL_LOCALE if the thread local locale has not been previously set.
- [+]locale.messages (18 / 4 / 0)
- [+]perror (5 / 2 / 0)
- perror.01
The perror() function shall map the error number accessed through the symbol errno to a language-dependent error message,
Generalizes:
- &perror.02.02
- perror.02.01
- perror.02.02
- perror.03
- perror.04
- perror.05
- perror.02
which shall be written to the standard error stream as follows:
- perror.02.01
First (if s is not a null pointer and the character pointed to by s is not the null byte), the string pointed to by s followed by a colon and a <space>.
- perror.02.02
Then an error message string followed by a <newline>.
The contents of the error message strings shall be the same as those returned by strerror() with argument errno.
- perror.03
[CX] The perror() function shall mark the file associated with the standard error stream as having been written (st_ctime, st_mtime marked for update) at some time between its successful completion and exit(), abort(), or the completion of fflush() or fclose() on stderr.
- perror.04
The perror() function shall not change the orientation of the standard error stream.
- perror.05 (struct)
The perror() function shall not return a value.
- [+]strerror (7 / 1 / 0)
- strerror.01
The strerror() function shall map the error number in errnum to a locale-dependent error message string and shall return a pointer to it.
Generalizes:
- &strerror.12
- strerror.02
- strerror.04
- strerror.05
- strerror.06
- strerror.07
- strerror.10
- strerror.11
- strerror.12.01
- strerror.02
strerror() shall map any value of type int to a message.
- app.strerror.03 (struct)
The string pointed to shall not be modified by the application,
- strerror.04 (struct)
but may be overwritten by a subsequent call to strerror() [CX] or perror().
- strerror.05
[CX] The contents of the error message strings returned by strerror() should be determined by the setting of the LC_MESSAGES category in the current locale.
- strerror.06
The implementation shall behave as if no function defined in this volume of IEEE Std 1003.1-2001 calls strerror().
- strerror.07
[CX] The strerror() function shall not change the setting of errno if successful.
- app.strerror.09
The strerror() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.
- strerror.10
Upon successful completion, strerror() shall return a pointer to the generated message string.
- strerror.11 (struct)
but no return value is reserved to indicate an error.
- strerror.12
These functions may fail if:
- strerror.12.01
[EINVAL] The value of errnum is not a valid error number.
- [+]strerror_r (6 / 1 / 0)
- strerror_r.01
strerror() shall map any value of type int to a message.
- strerror_r.02
[TSF] The strerror_r() function shall map the error number in errnum to a locale-dependent error message string and shall return the string in the buffer pointed to by strerrbuf, with length buflen.
- strerror_r.03
Upon successful completion, strerror_r() shall return 0.
- strerror_r.04
Otherwise, an error number shall be returned to indicate the error.
- strerror_r.05
These functions may fail if:
- strerror_r.05.01
[EINVAL] The value of errnum is not a valid error number.
- strerror_r.05.02
[ERANGE] [TSF] Insufficient storage was supplied via strerrbuf and buflen to contain the generated message string.
- [+]locale.nlcat (42 / 2 / 0)
- [+]catclose (5 / 0 / 0)
- catclose.01
The catclose() function shall close the message catalog identified by catd.
Generalizes:
- catclose.03
- catclose.04
- catclose.05.01
- catclose.05.02
- catclose.03
Upon successful completion, catclose() shall return 0;
- catclose.04
otherwise, -1 shall be returned, and errno set to indicate the error.
- catclose.05
The catclose() function may fail if:
- catclose.05.01
[EBADF] The catalog descriptor is not valid.
- catclose.05.02
[EINTR] The catclose() function was interrupted by a signal.
- [+]catgets (8 / 1 / 0)
- catgets.01
The catgets() function shall attempt to read message msg_id, in set set_id, from the message catalog identified by catd.
Generalizes:
- catgets.03
- catgets.04
- catgets.05.01
- catgets.05.02
- catgets.05.03
- catgets.05.04
- catgets.05.05
- app.catgets.02
The catgets() function need not be reentrant.
- catgets.03
If the identified message is retrieved successfully, catgets() shall return a pointer to an internal buffer area containing the null-terminated message string.
- catgets.04
If the call is unsuccessful for any reason, s shall be returned and errno may be set to indicate the error.
- catgets.05
The catgets() function may fail if:
- catgets.05.01
[EBADF] The catd argument is not a valid message catalog descriptor open for reading.
- catgets.05.02
[EBADMSG] The message identified by set_id and msg_id in the specified message catalog did not satisfy implementation-defined security criteria.
- catgets.05.03
[EINTR] The read operation was terminated due to the receipt of a signal, and no data was transferred.
- catgets.05.04
[EINVAL] The message catalog identified by catd is corrupted.
- catgets.05.05
[ENOMSG] The message identified by set_id and msg_id is not in the message catalog.
- [+]catopen (29 / 1 / 0)
- catopen.01
The catopen() function shall open a message catalog and return a message catalog descriptor.
Generalizes:
- &catopen.04.01
- &catopen.04.02
- catopen.02.01
- catopen.02.02
- catopen.04
- catopen.05
- catopen.06
- catopen.07
- catopen.08
- catopen.09
- catopen.10.01
- catopen.10.02
- catopen.10.03
- catopen.10.04
- catopen.10.05
- catopen.10.06
- catopen.10.07
- catopen.10.08
- catopen.11
- catopen.12.01
- catopen.12.02
- catopen.12.03
- catopen.12.04
- catopen.12.05
- catopen.12.06
- catopen.13
- catopen.14
- catopen.15
- catopen.16
- catopen.17
- catopen.02
The name argument specifies the name of the message catalog to be opened.
- catopen.02.01
If name contains a '/', then name specifies a complete name for the message catalog.
- catopen.02.02
Otherwise, the environment variable NLSPATH is used with name substituted for the %N conversion specification (see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment Variables).
- app.catopen.03
If NLSPATH exists in the environment when the process starts, then if the process has appropriate privileges, the behavior of catopen() is undefined.
- catopen.04
If NLSPATH does not exist in the environment, or if a message catalog cannot be found in any of the components specified by NLSPATH , then an implementation-defined default path shall be used.
- catopen.05
A message catalog descriptor shall remain valid in a process until that process closes it, or a successful call to one of the exec functions.
- catopen.06
A change in the setting of the LC_MESSAGES category may invalidate existing open catalogs.
- catopen.07
If a file descriptor is used to implement message catalog descriptors, the FD_CLOEXEC flag shall be set; see <fcntl.h>.
- catopen.08
Upon successful completion, catopen() shall return a message catalog descriptor for use on subsequent calls to catgets() and catclose().
- catopen.09
Otherwise, catopen() shall return ( nl_catd) -1 and set errno to indicate the error.
- catopen.10
The catopen() function may fail if:
- catopen.10.01
[EACCES] Search permission is denied for the component of the path prefix of the message catalog or read permission is denied for the message catalog.
- catopen.10.02
[EMFILE] {OPEN_MAX} file descriptors are currently open in the calling process.
- catopen.10.03
[ENAMETOOLONG] The length of a pathname of the message catalog exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
- catopen.10.04
[ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
- catopen.10.05
[ENFILE] Too many files are currently open in the system.
- catopen.10.06
[ENOENT] The message catalog does not exist or the name argument points to an empty string.
- catopen.10.07
[ENOMEM] Insufficient storage space is available.
- catopen.10.08
[ENOTDIR] A component of the path prefix of the message catalog is not a directory.
- catopen.11
defines that catopen() should look for all message catalogs in the directory /system/nlslib, where the catalog name should be constructed from the name parameter passed to catopen() ( %N ), with the suffix .cat.
- catopen.12
Conversion specifications consist of a '%' symbol, followed by a single-letter keyword. The following keywords are currently defined:
- catopen.12.01
%N The value of the name parameter passed to catopen().
- catopen.12.02
%L The value of the LC_MESSAGES category.
- catopen.12.03
%l The language element from the LC_MESSAGES category.
- catopen.12.04
%t The territory element from the LC_MESSAGES category.
- catopen.12.05
%c The codeset element from the LC_MESSAGES category.
- catopen.12.06
%% A single '%' character.
- catopen.13
An empty string is substituted if the specified value is not currently defined.
- catopen.14
The separators underscore ( '_' ) and period ( '.' ) are not included in the %t and %c conversion specifications.
- catopen.15
Templates defined in NLSPATH are separated by colons ( ':' ).
- catopen.16
A leading or two adjacent colons "::" is equivalent to specifying %N.
- catopen.17
indicates to catopen() that it should look for the requested message catalog in name, name.cat, and /nlslib/category/name.cat, where category is the value of the LC_MESSAGES category of the current locale.
- [+]locale.textdomain (86 / 56 / 0)
- [+]bind_textdomain_codeset (14 / 9 / 0)
- bind_textdomain_codeset.01
The bind_textdomain_codeset() function can be used to specify the output codeset for message catalogs for domain domainname.
- app.bind_textdomain_codeset.02
The codeset argument shall be a valid codeset name which can be used tor the iconv_open function, or a null pointer.
- bind_textdomain_codeset.03
If the codeset argument is the null pointer, then function returns the currently selected codeset for the domain with the name domainname.
- bind_textdomain_codeset.04
It shall return a null pointer if no codeset has yet been selected.
- bind_textdomain_codeset.05
Each successive call to bind_textdomain_codeset() function overrrides the settings made by the preceding call with the same domainname.
- bind_textdomain_codeset.06
The bind_textdomain_codeset() function shall return a pointer to a string containing the name of the selected codeset.
- bind_textdomain_codeset.07
The string
- bind_textdomain_codeset.07.01
shall be allocated internally in the function
- app.bind_textdomain_codeset.08
The string
- bind_textdomain_codeset.11
The domainname argument is applied to the currently active LC_MESSAGE locale.
- bind_textdomain_codeset.14
The name of the output codeset for the selected domain
- bind_textdomain_codeset.15
or NULL to select the current codeset.
- bind_textdomain_codeset.16
If domainname is the null pointer, or is an empty string, bind_textdomain_codeset()
- bind_textdomain_codeset.16.01
shall fail
- bind_textdomain_codeset.16.02
need not set errno.
- bind_textdomain_codeset.17
Returns the currently selected codeset name.
- bind_textdomain_codeset.18
It returns a null pointer if no codeset has yet been selected.
- bind_textdomain_codeset.19
[ENOMEM] Insufficient memory available to allocate return value.
- [+]bindtextdomain (11 / 9 / 0)
- bindtextdomain.01
The bindtextdomain() shall set the the base directory of the hierarchy containing message catalogs for a given message domain.
- bindtextdomain.01.01
The bindtextdomain() function specifies that the domainname message catalog can be found in the dirname directory hierarchy, rather than in the system default locale data base.
- bindtextdomain.02
If dirname is not NULL, the base directory for message catalogs belonging to domain domainname shall be set to dirname.
- bindtextdomain.03
If dirname is NULL, the base directory for message catalogs shall not be altered.
- bindtextdomain.05
If domainname is the null pointer, or is an empty string, bindtextdomain()
- bindtextdomain.05.01
shall fail
- bindtextdomain.05.02
need not set errno.
- bindtextdomain.06
The bindtextdomain() function shall return a pointer to a string containing the name of the selected directory.
- bindtextdomain.07
The string
- bindtextdomain.07.01
shall be allocated internally in the function
- bindtextdomain.08
On success, bindtextdomain() shall return a pointer to a string containing the directory pathname currently bound to the domain.
- bindtextdomain.09
On failure,
- bindtextdomain.09.01
a NULL pointer is returned
- bindtextdomain.09.02
the global variable errno may be set to indicate the error.
- bindtextdomain.10
[ENOMEM] Insufficient memory was available.
- [+]dcgettext (9 / 5 / 0)
- dcgettext.01
The dcgettext() function shall lookup the translation in the current locale of the message identified by msgid in the domain specified by domainname and in the locale category specified by category.
- dcgettext.02
If domainname is NULL, the current default domain shall be used.
- app.dcgettext.03
The msgid argument shall be a NULL-terminated string to be matched in the catalogue.
- dcgettext.04
category shall specify the locale category to be used for retrieving message strings.
- dcgettext.05
The category parameter shall be one of LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, or LC_TIME.
- dcgettext.06
The default domain shall not be changed by a call to dcgettext().
- dcgettext.07
If a translation was found in one of the specified catalogs, it shall be converted to the current locale's codeset and returned.
- dcgettext.08
The resulting NULL-terminated string
- dcgettext.08.01
shall be allocated by the dcgettext function
- dcgettext.10
If no translation was found, or category was invalid, msgid shall be returned.
- dcgettext.11
dcgettext() shall not modify the errno global variable.
- [+]dcngettext (12 / 8 / 0)
- dcngettext.01
The dcngettext() function shall lookup the translation in the current locale of the message identified by msgid1 in the domain specified by domainname and in the locale category specified by category.
- dcngettext.02
If domainname is NULL, the current default domain shall be used.
- app.dcngettext.03
The msgid1 argument shall be a NULL-terminated string to be matched in the catalogue.
- dcngettext.04
category shall specify the locale category to be used for retrieving message strings.
- dcngettext.05
The category parameter shall be one of LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, or LC_TIME.
- dcngettext.06
The default domain shall not be changed by a call to dcngettext().
- dcngettext.07
If n is 1 then the singular version of the message is returned
- dcngettext.08
otherwise one of the plural forms is returned, depending on the value of n and the current locale settings.
- dcngettext.09
If a translation corresponding to the value of n was found in one of the specified catalogs for msgid1, it shall be converted to the current locale's codeset and returned.
- dcngettext.10
The resulting NULL-terminated string
- dcngettext.10.01
shall be allocated by the dcngettext() function
- dcngettext.12
If no translation was found, or category was invalid, msgid1 shall be returned if n has the value 1
- dcngettext.13
otherwise msgid2 shall be returned.
- dcngettext.14
dcngettext() shall not modify the errno global variable.
- [+]dgettext (7 / 4 / 0)
- dgettext.01
The dgettext() function shall search the currently selected message catalogs in the domain domainname for a string identified by the string msgid.
- dgettext.02
If a string is located, that string shall be returned. The domain specified by domainname applies to the currently active LC_MESSAGE locale.
- dgettext.03
The default domain shall not be changed by a call to dgettext().
- dgettext.05
The dgettext() function is equivalent to dcgettext(domainname, msgid, LC_MESSAGES).
- dgettext.06
On success of a msgid query, the translated NULL-terminated string is returned.
- dgettext.07
On error, the original msgid is returned.
- dgettext.09
dgettext() shall not modify the errno global variable.
- [+]dngettext (11 / 7 / 0)
- dngettext.01
The dcngettext() function shall lookup the translation in the current locale of the message identified by msgid1 in the domain specified by domainname and in the locale category specified by category.
- dngettext.02
If domainname is NULL, the current default domain shall be used.
- app.dngettext.03
The msgid1 argument shall be a NULL-terminated string to be matched in the catalogue.
- dngettext.06
The default domain shall not be changed by a call to dcngettext().
- dngettext.07
If n is 1 then the singular version of the message is returned
- dngettext.08
otherwise one of the plural forms is returned, depending on the value of n and the current locale settings.
- dngettext.09
If a translation corresponding to the value of n was found in one of the specified catalogs for msgid1, it shall be converted to the current locale's codeset and returned.
- dngettext.10
The resulting NULL-terminated string
- dngettext.10.01
shall be allocated by the dcngettext() function
- dngettext.12
If no translation was found, or category was invalid, msgid1 shall be returned if n has the value 1
- dngettext.13
otherwise msgid2 shall be returned.
- dngettext.14
dcngettext() shall not modify the errno global variable.
- dngettext.30
dngettext() shall be equivalent to a call to dcngettext(domainname, msgid1, msgid2, n, LC_MESSAGES)
- [+]gettext (6 / 4 / 0)
- gettext.01
The gettext() function shall search the currently selected message catalogs for a string identified by the string msgid.
- gettext.02
If a string is located, that string shall be returned.
- gettext.03
The gettext() function is equivalent to dcgettext(NULL, msgid, LC_MESSAGES).
- gettext.04
If a string is found in the currently selected message catalogs for msgid, then a pointer to that string shall be returned.
- gettext.05
Otherwise, a pointer to msgid shall be returned.
- gettext.07
The gettext() function shall not modify errno.
- [+]ngettext (9 / 5 / 0)
- ngettext.01
The ngettext() function shall search the currently selected message catalogs for a string matching the singular string msgid1.
- ngettext.02
If a string is located, and if n is 1, that string shall be returned.
- ngettext.03
If n is not 1, a pluralized version (dependent on n) of the string shall be returned.
- ngettext.05
The ngettext() function is equivalent to dcngettext(NULL, msgid1, msgid2, n, LC_MESSAGES)().
- ngettext.06
If a string is found in the currently selected message catalogs for msgid1, then
- ngettext.06.01
if n is 1 a pointer to the located string shall be returned.
- ngettext.06.02
If n is not 1, a pointer to an appropriately pluralized version of the string shall be returned.
- ngettext.07
If no message could be found in the currently selected mesage catalogs, then if n is 1, a pointer to msgid1 shall be returned
- ngettext.08
otherwise a pointer to msgid2 shall be returned.
- ngettext.10
The ngettext() function shall not modify errno.
- [+]textdomain (7 / 5 / 0)
- textdomain.01
The textdomain() function shall set the current default message domain to domainname.
- textdomain.02
If domainname is NULL, the default message domain shall not be altered.
- textdomain.03
If domainname is "", textdomain() shall reset the default domain to the system default of "messages".
- textdomain.04
On success, textdomain() shall return the currently selected domain.
- textdomain.05
Otherwise, a null pointer shall be returned
- textdomain.06
and errno is set to indicate the error.
- textdomain.07
[ENOMEM] Insufficent memory available.
- [+]locale.wcollate (11 / 7 / 0)
- [+]wcscoll (4 / 2 / 0)
- wcscoll.01
The wcscoll() function shall compare the wide-character string pointed to by ws1 to the wide-character string pointed to by ws2, both interpreted as appropriate to the LC_COLLATE category of the current locale.
- wcscoll.01.01
Upon successful completion, wcscoll() shall return an integer greater than, equal to, or less than 0, according to whether the wide-character string pointed to by ws1 is greater than, equal to, or less than the wide-character string pointed to by ws2, when both are interpreted as appropriate to the current locale.
- wcscoll.02
The wcscoll() function shall not change the setting of errno if successful.
- app.wcscoll.03
An application wishing to check for error situations should set errno to 0 before calling wcscoll(). If errno is non-zero on return, an error has occurred.
- wcscoll.04
On error, wcscoll() shall set errno, but no return value is reserved to indicate an error.
- wcscoll.05
The wcscoll() function may fail if:
- wcscoll.05.01
[EINVAL] [CX] The ws1 or ws2 arguments contain wide-character codes outside the domain of the collating sequence.
- [+]wcsxfrm (7 / 5 / 0)
- wcsxfrm.01
The wcsxfrm() function shall transform the wide-character string pointed to by ws2 and place the resulting wide-character string into the array pointed to by ws1. The transformation shall be such that if wcscmp() is applied to two transformed wide strings, it shall return a value greater than, equal to, or less than 0, corresponding to the result of wcscoll() applied to the same two original wide-character strings.
- wcsxfrm.02
No more than n wide-character codes shall be placed into the resulting array pointed to by ws1, including the terminating null wide-character code.
- app.wcsxfrm.03
If n is 0, ws1 is permitted to be a null pointer.
- app.wcsxfrm.04
If copying takes place between objects that overlap, the behavior is undefined.
- wcsxfrm.05
The wcsxfrm() function shall not change the setting of errno if successful.
- app.wcsxfrm.06
Since no return value is reserved to indicate an error, an application wishing to check for error situations should set errno to 0, then call wcsxfrm(), then check errno.
- wcsxfrm.07
The wcsxfrm() function shall return the length of the transformed wide-character string (not including the terminating null wide-character code).
- wcsxfrm.08
If the value returned is n or more, the contents of the array pointed to by ws1 are unspecified.
- wcsxfrm.09
[CX] On error, the wcsxfrm() function may set errno, but no return value is reserved to indicate an error.
- wcsxfrm.10
The wcsxfrm() function may fail if:
- wcsxfrm.10.01
[EINVAL] [CX] The wide-character string pointed to by ws2 contains wide-character codes outside the domain of the collating sequence.
- [+]locale.wctrans (12 / 4 / 0)
- [+]towctrans (3 / 0 / 0)
- towctrans.01
The towctrans() function shall transliterate the wide-character code wc using the mapping described by desc.
- towctrans.01.01
If successful, the towctrans() function shall return the mapped value of wc using the mapping described by desc.
- towctrans.01.02
Otherwise, it shall return wc unchanged.
- app.towctrans.02
The current setting of the LC_CTYPE category should be the same as during the call to wctrans() that returned the value desc. [CX] If the value of desc is invalid (that is, not obtained by a call to wctrans() or desc is invalidated by a subsequent call to setlocale() that has affected category LC_CTYPE ), the result is unspecified.
- app.towctrans.03
An application wishing to check for error situations should set errno to 0 before calling towctrans(). If errno is non-zero on return, an error has occurred.
- towctrans.04
The towctrans() function may fail if:
- towctrans.04.01
[EINVAL] [CX] desc contains an invalid transliteration descriptor.
- [+]towlower (2 / 2 / 0)
- app.towlower.01
The towlower() function has as a domain a type wint_t, the value of which the application shall ensure is a character representable as a wchar_t, and a wide-character code corresponding to a valid character in the current locale or the value of WEOF. If the argument has any other value, the behavior is undefined.
- towlower.02
If the argument of towlower() represents an uppercase wide-character code, and there exists a corresponding lowercase wide-character code (as defined by character type information in the program locale category LC_CTYPE ), the result shall be the corresponding lowercase wide-character code.
- towlower.02.01
Upon successful completion, towlower() shall return the lowercase letter corresponding to the argument passed;
- towlower.03
All other arguments in the domain are returned unchanged.
- towlower.03.01
otherwise, it shall return the argument unchanged.
- [+]towupper (2 / 2 / 0)
- app.towupper.01
The towupper() function has as a domain a type wint_t, the value of which the application shall ensure is a character representable as a wchar_t, and a wide-character code corresponding to a valid character in the current locale or the value of WEOF. If the argument has any other value, the behavior is undefined.
- towupper.02
If the argument of towupper() represents a lowercase wide-character code, and there exists a corresponding uppercase wide-character code (as defined by character type information in the program locale category LC_CTYPE ), the result shall be the corresponding uppercase wide-character code.
- towupper.02.01
Upon successful completion, towupper() shall return the uppercase letter corresponding to the argument passed.
- towupper.03
All other arguments in the domain are returned unchanged.
- towupper.03.01
Otherwise, it shall return the argument unchanged.
- [+]wctrans (5 / 0 / 0)
- app.wctrans.01
The wctrans() function is defined for valid character mapping names identified in the current locale. The charclass is a string identifying a generic character mapping name for which codeset-specific information is required. The following character mapping names are defined in all locales: tolower and toupper.
- app.wctrans.03
The function shall return a value of type wctrans_t, which can be used as the second argument to subsequent calls of towctrans().
- wctrans.04
The wctrans() function shall determine values of wctrans_t according to the rules of the coded character set defined by character mapping information in the program's locale (category LC_CTYPE ).
- wctrans.05
The values returned by wctrans() shall be valid until a call to setlocale() that modifies the category LC_CTYPE .
- wctrans.06.01
The wctrans() function shall return 0 [CX] and may set errno to indicate the error if the given character mapping name is not valid for the current locale (category LC_CTYPE );
- wctrans.06.02
otherwise, it shall return a non-zero object of type wctrans_t that can be used in calls to towctrans().
- wctrans.07
The wctrans() function may fail if:
- wctrans.07.01
[EINVAL] [CX] The character mapping name pointed to by charclass is not valid in the current locale.
- [+]locale.wctype (37 / 10 / 0)
- [+]iswalnum (2 / 1 / 0)
- iswalnum.01
The iswalnum() function shall test whether wc is a wide-character code representing a character of class alpha or digit in the program's current locale
- iswalnum.01.01
The iswalnum() function shall return non-zero if wc is an alphanumeric wide-character code
- iswalnum.01.02
otherwise, it shall return 0.
- app.iswalnum.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswalpha (2 / 1 / 0)
- iswalpha.01
The iswalpha() function shall test whether wc is a wide-character code representing a character of class alpha in the program's current locale
- iswalpha.01.01
The iswalpha() function shall return non-zero if wc is an alphabetic wide-character code
- iswalpha.01.02
otherwise, it shall return 0.
- app.iswalpha.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswblank (2 / 1 / 0)
- iswblank.01
The iswblank() function shall test whether wc is a wide-character code representing a character of class blank in the program's current locale
- iswblank.01.01
The iswblank() function shall return non-zero if wc is a blank wide-character code
- iswblank.01.02
otherwise, it shall return 0.
- app.iswblank.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswcntrl (2 / 0 / 0)
- iswcntrl.01
The iswcntrl() function shall test whether wc is a wide-character code representing a character of class cntrl in the program's current locale
- iswcntrl.01.01
The iswcntrl() function shall return non-zero if wc is a control wide-character code
- iswcntrl.01.02
otherwise, it shall return 0.
- app.iswcntrl.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswctype (2 / 0 / 0)
- iswctype.01
The iswctype() function shall determine whether the wide-character code wc has the character class charclass, returning true or false.
- iswctype.01.01
The iswctype() function shall return non-zero (true) if and only if wc has the property described by charclass.
- iswctype.01.02
[CX] If charclass is 0, iswctype() shall return 0.
- app.iswctype.02
The iswctype() function is defined on WEOF and wide-character codes corresponding to the valid character encodings in the current locale. If the wc argument is not in the domain of the function, the result is undefined.
- app.iswctype.03
If the value of charclass is invalid (that is, not obtained by a call to wctype() or charclass is invalidated by a subsequent call to setlocale() that has affected category LC_CTYPE ) the result is unspecified.
- [+]iswdigit (2 / 1 / 0)
- iswdigit.01
The iswdigit() function shall test whether wc is a wide-character code representing a character of class digit in the program's current locale
- iswdigit.01.01
The iswdigit() function shall return non-zero if wc is a decimal digit wide-character code
- iswdigit.01.02
otherwise, it shall return 0.
- app.iswdigit.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswgraph (2 / 1 / 0)
- iswgraph.01
The iswgraph() function shall test whether wc is a wide-character code representing a character of class graph in the program's current locale
- iswgraph.01.01
The iswgraph() function shall return non-zero if wc is a wide-character code with a visible representation
- iswgraph.01.02
otherwise, it shall return 0.
- app.iswgraph.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswlower (2 / 1 / 0)
- iswlower.01
The iswlower() function shall test whether wc is a wide-character code representing a character of class lower in the program's current locale
- iswlower.01.01
The iswlower() function shall return non-zero if wc is a lowercase letter wide-character code
- iswlower.01.02
otherwise, it shall return 0.
- app.iswlower.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswprint (2 / 1 / 0)
- iswprint.01
The iswprint() function shall test whether wc is a wide-character code representing a character of class print in the program's current locale
- iswprint.01.01
The iswprint() function shall return non-zero if wc is a printable wide-character code
- iswprint.01.02
otherwise, it shall return 0.
- app.iswprint.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswpunct (2 / 0 / 0)
- iswpunct.01
The iswpunct() function shall test whether wc is a wide-character code representing a character of class punct in the program's current locale
- iswpunct.01.01
The iswpunct() function shall return non-zero if wc is a punctuation wide-character code
- iswpunct.01.02
otherwise, it shall return 0.
- app.iswpunct.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswspace (2 / 1 / 0)
- iswspace.01
The iswspace() function shall test whether wc is a wide-character code representing a character of class space in the program's current locale
- iswspace.01.01
The iswspace() function shall return non-zero if wc is a white-space wide-character code
- iswspace.01.02
otherwise, it shall return 0.
- app.iswspace.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswupper (2 / 1 / 0)
- iswupper.01
The iswupper() function shall test whether wc is a wide-character code representing a character of class upper in the program's current locale
- iswupper.01.01
The iswupper() function shall return non-zero if wc is an uppercase letter wide-character code
- iswupper.01.02
otherwise, it shall return 0.
- app.iswupper.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]iswxdigit (2 / 1 / 0)
- iswxdigit.01
The iswxdigit() function shall test whether wc is a wide-character code representing a character of class xdigit in the program's current locale
- iswxdigit.01.01
The iswxdigit() function shall return non-zero if wc is a hexadecimal digit wide-character code
- iswxdigit.01.02
otherwise, it shall return 0.
- app.iswxdigit.02
The wc argument is a wint_t, the value of which the application shall ensure is a wide-character code corresponding to a valid character in the current locale, or equal to the value of the macro WEOF. If the argument has any other value, the behavior is undefined.
- [+]wcswidth (3 / 0 / 0)
- wcswidth.01
The wcswidth() function shall determine the number of column positions required for n wide-character codes (or fewer than n wide-character codes if a null wide-character code is encountered before n wide-character codes are exhausted) in the string pointed to by pwcs.
- wcswidth.01.01
The wcswidth() function either shall return 0 (if pwcs points to a null wide-character code),
- wcswidth.01.02
or return the number of column positions to be occupied by the wide-character string pointed to by pwcs,
- wcswidth.01.03
or return -1 (if any of the first n wide-character codes in the wide-character string pointed to by pwcs is not a printable wide-character code).
- [+]wctype (5 / 0 / 0)
- app.wctype.01
The wctype() function is defined for valid character class names as defined in the current locale. The property argument is a string identifying a generic character class for which codeset-specific type information is required.
- wctype.02
The following character class names shall be defined in all locales:
alnum
alpha
blank
cntrl
digit
graph
lower
print
punct
space
upper
xdigit
- app.wctype.03
Additional character class names defined in the locale definition file (category LC_CTYPE ) can also be specified.
- app.wctype.04
The function shall return a value of type wctype_t, which can be used as the second argument to subsequent calls of iswctype().
- wctype.05
The wctype() function shall determine values of wctype_t according to the rules of the coded character set defined by character type information in the program's locale (category LC_CTYPE ).
- wctype.06
The values returned by wctype() shall be valid until a call to setlocale() that modifies the category LC_CTYPE .
- wctype.07.01
The wctype() function shall return 0 if the given character class name is not valid for the current locale (category LC_CTYPE )
- wctype.07.02
otherwise, it shall return an object of type wctype_t that can be used in calls to iswctype().
- [+]wcwidth (3 / 0 / 0)
- wcwidth.01
The wcwidth() function shall determine the number of column positions required for the wide character wc.
- wcwidth.01.01
The wcwidth() function shall either return 0 (if wc is a null wide-character code),
- wcwidth.01.02
or return the number of column positions to be occupied by the wide-character code wc,
- wcwidth.01.03
or return -1 (if wc does not correspond to a printable wide-character code).
- app.wcwidth.02
The application shall ensure that the value of wc is a character representable as a wchar_t
- app.wcwidth.03
and is a wide-character code corresponding to a valid character in the current locale.
- [+]math.bessel (327 / 105 / 0)
- [+]j0 (18 / 3 / 0)
- j0.01
The j0(), j1(), and jn() functions shall compute Bessel functions of x of the first kind of orders 0, 1, and n, respectively.
Generalizes:
- j0.02
- j0.03
- j0.04
- j0.05
- j0.06
- j0.07.01.01
- j0.07.01.02
- j0.08
- j0.09.01
- j0.09.02
- j0.09.03
- j0.10.01
- j0.10.02
- j0.10.03
- j0.10.04
- j0.10.05
- j0.11
- j0.02
An application wishing to check for error situations should set errno to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these functions.
- j0.03
On return, if errno is non-zero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has occurred.
- j0.04
Upon successful completion, these functions shall return the relevant Bessel value of x of the first kind.
- j0.05
If the x argument is too large in magnitude, or the correct result would cause underflow, 0 shall be returned and a range error may occur.
- j0.06
If x is NaN, a NaN shall be returned.
- j0.07
These functions may fail if:
- j0.07.01
Range Error The value of x was too large in magnitude, or an underflow occurred.
- j0.07.01.01
If the integer expression (math_errhandling & MATH_ERRNO) is non-zero, then errno shall be set to [ERANGE].
- j0.07.01.02
If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then the underflow floating-point exception shall be raised.
- j0.08
If x is Inf, a 0 shall be returned.
- j0.09
If x is 0, functions shall return following values:
- j0.09.01
j0(x=0)=1
- j0.09.02
j1(x=0)=0
- j0.09.03
jn(n, x=0)=1 if n equal 0 and jn(n, x=0)=0 if n not equal 0
- j0.10
Functions shall answer following statements for each value of order n and argument x:
- j0.10.01
j0(-x)=j0(x)
- j0.10.02
j1(-x)=-j1(x)
- j0.10.03
jn(n, -x)=jn(n, x)*(-1)^n
- j0.10.04
jn(-n, x)=jn(n, x)*(-1)^n
- j0.10.05
jn(n-1, x)+jn(n+1, x)=(2n/x)*jn(n, x)
- j0.11
Functions shall return value with the correct sign
- [+]j0f (19 / 3 / 0)
- j0f.08
j0f() has the same specification as j0() in ISO POSIX (2003), except that the argument type for j0f is known to be float.
Generalizes:
- j0f.j0.01
- j0f.j0.02
- j0f.j0.03
- j0f.j0.04
- j0f.j0.05
- j0f.j0.06
- j0f.j0.07.01.01
- j0f.j0.07.01.02
- j0f.j0.08
- j0f.j0.09.01
- j0f.j0.09.02
- j0f.j0.09.03
- j0f.j0.10.01
- j0f.j0.10.02
- j0f.j0.10.03
- j0f.j0.10.04
- j0f.j0.10.05
- j0f.j0.11
- j0f.j0.01