Chapter 20. Additional Behaviors

This section specifies behaviors in which there is optional behavior in one of the standards on which the LSB relies, and where the LSB requires a specific behavior. [1]

The fcntl() function shall detect EDEADLK, as described as optional behavior in the SUS.

The fcntl() function shall treat the "cmd" value -1 as invalid.

The "whence" value -1 shall be an invalid value for the lseek(), fseek() and fcntl() functions.

The value "-5" shall be an invalid signal number.

The opendir() function shall detect EMFILE and ENFILE, as described as optional behavior in the SUS.

The readdir() and closedir() functions shall detect EBADF, as described as optional behavior in the SUS.

If the sigaddset() or sigdelset() functions are passed an invalid signal number, they shall return with EINVAL. Implementations are only required to enforce this requirement for signal numbers which are specified to be invalid by this specification (such as the -5 mentioned above).

The START and STOP termios characters shall be changeable, as described as optional behavior in the "General Terminal Interface" section of the SUS.

The mode value "-1" to the access() function shall be treated as invalid.

A value of -1 shall be an invalid "_PC_..." value for pathconf().

A value of -1 shall be an invalid "_SC..." value for sysconf().

The link() function shall require access to the existing file in order to succeed, as described as optional behavior in the SUS.

Calling unlink() on a directory shall fail. Calling link() specifying a directory as the first argument shall fail. See also unlink>.

The link() function shall not work across file systems, and shall return with EXDEV as described as optional behavior in the SUS.

The nl_item value "-1" shall be invalid for nl_langinfo.

The value -1 shall be an invalid "_CS_..." value for confstr().

The value "z" shall be an invalid mode argument to popen().

[2]

Notes

[1]

The intention is that none of these choices will create problems in practice (for example, for LSB implementations on top of non-Linux kernels). Future versions of the LSB may relax these requirements if needed.

[2]

On a Linux kernel, removing or renaming a directory will give EBUSY only when the directory is in use by a system process. However, the LSB does not specify this behavior on the grounds that it is of no use to applications and may be difficult to implement on some kernels.

Linux allows one to call rename() on a directory without having write access, but the LSB does not require this.