Update of the POSIX standard 1003.1-2024 with new tools and functions

IEEE and The Open Group have released POSIX version 1003.1-2024. The UNIX standard includes many extensions, new functions, options and tools.

Save to Pocket listen Print view
US license plate with the lettering "UNIX"

(Image: "Actual DEC UNIX License Plate DSC 0317" by Armandops - Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons.)

3 min. read
By
  • André von Raison
This article was originally published in German and has been automatically translated.

After seven years of development, the IEEE Computer Society and the Open Group Consortium have adopted a new version of the POSIX 1003.1-2024 standard, which is intended to ensure portability between UNIX-like operating systems. The POSIX standard (Portable Operating System Interface) defines software interfaces between operating systems and application programs.

POSIX is divided into four parts. The basic definitions are a list of the conventions, definitions and concepts used in the standard. The system interface describes the C system calls with the associated header files. The third part contains a definition of the command line interpreters and auxiliary programs, i.e. shell functions and utility programs. Finally, a section provides explanations about the standard. In the heyday of the mutually incompatible commercial Unix variants, POSIX conformity was an important criterion when choosing an operating system for a desired software. Since the current Linux and BSD variants are largely POSIX-compatible, the standard that has now been published follows and standardizes many of the additions already implemented in these.

The committees extended the shell processing area with the two tools readlink for displaying the content of symbolic links and realpath for resolving the path name of a file. Also new for the find tool are the options -print0 for outputting the path name with a terminating null byte and -iname for the case-insensitive search. With xargs, the delimitation of arguments by zero bytes via the -0 option is now also included. With read, the delimiter can be defined via -d, sed uses extended regular expressions via -E and set knows the -o pipefail option.

For C programs there is now the SIGWINCH constant and tools for creating shared objects. Some new functions have also been added:

  • tcgetwinsize (determining the size of the terminal window)
  • gettext (organization of multilingual interfaces)
  • asprintf (formatting a character string and assigning a buffer considering the size of the output)
  • strlcpy and strlcat (analogous to strncpy and strncat, which append a zero byte at the end to protect against buffer overflows)

The definition for make now contains nested macros, allows multiple files to be specified in the include directive, and includes new targets such as .NOTPARALLEL, .PHONY and .WAIT. The macro CURDIR points to the current directory and with "::=", "::=", "+=", "?=" and "!=" there are new assignment operators for macros and variables.

The text of the standard is currently only available as a PDF on the IEEE website for paying customers, educational institutions and registered users with an account. The text of the standard will be published on the Open Group website "in the near future". So far, only the previous edition of POSIX 1003.1-2017 is publicly available here.

(avr)