Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Range of functions extended by the POSIX functionality

&pagelevel(4)&pagelevel

When a program is compiled, linked and started in the POSIX shell (see also the manual "C/C++ POSIX Commands of the C and C++ Compilers", "C Compiler" or "C++ Compiler"), the available functionality of the C library is as listed in the following. This functionality is called the POSIX functionality in the following:

  • All XPG4 Version 2-conformant functions (marked with x or y in the "XPG4 Version 2" column in the table on "Scope of the supported C library") are supported.

  • All XPG5-conformant functions (marked with x or y in the "XPG5" column in the table on "Scope of the supported C library") are supported.

  • All functions that are marked with x or y in the column "Other Standards" or "ANSI" in the table on "Scope of the supported C library" are supported.
  • All functions identified as extensions (marked with an x in the "Extension" and "BS2000" columns in the table on "Scope of the supported C library") are supported.

  • XPG4 Version 2-conformant functionality is supported for all functions marked with xa. This includes the following function groups:

    • the time functions clock(), ctime(), ctime_r(), ftime(), gmtime(), localtime(), mktime(), time()

    • the functions for process control, i.e. abort(), alarm(), _exit(), kill(),raise(), and signal().

  • In the case of functions that are marked with xd in the table, it is possible to access BS2000 or POSIX files on an individual basis. This can be controlled as described under section “Selecting the file system and the system environment”. This function group also includes the system() function, since it can be controlled on the source program level as in the case of the file access functions.

Programs that are run in the POSIX shell are started internally with fork() and an exec function and thus have a parent process.

The range of functions extended by POSIX functionality can also be selected when a program is compiled, linked and started on the BS2000 command level, provided the following is taken into account:

  1. Steps to be observed at compilation:

    1. In addition to the $.SYSLNK.CRTE library, the
      $.SYSLIB.POSIX-HEADER library must be specified so that the correct header files are found (option STD-INCLUDE-LIBRARY).

    2. _OSD_POSIX must be defined. This can be done by choosing one of the methods given below:

      • by specifying the following before the first #include statement in the source code:

        #define _OSD_POSIX

      • by setting the SOURCE-PROPERTIES option for the compilation run as follows:

        SOURCE-PROPERTIES=PAR(DEFINE=_OSD_POSIX)

  2. When linking the link option $.SYSLNK.CRTE.POSIX must be specified before $.SYSLNK.CRTE or $.SYSLNK.CRTE.PARTIAL-BIND.

Programs that are compiled, linked and started on the BS2000 command level as indicated above are executed in a task and thus have no parent process.