1. Introduction

    System Information

  2. Inter-Process Communication
  3. Signals

    Programming in Various Environments

  4. Script Programming
    1. Script Variables
    2. Test Conditions
    3. Control and Iteration
    4. Commonly used Programs
    5. Shell Capabilities
    6. Example looping script
    7. Example using Variables
    8. Example working with files
    9. Example install script
  5. C and C++ Programming
    1. POSIX System Capabilities
    2. More POSIX
    3. Threads
    4. Mutexes
    5. An example viewmod program
    6. An example serial program
  6. X Programming
  7. Debugging
  8. Credits

More Linux POSIX Testing

The machine a program may run on will have different capabilities depending to its setup and how the kernel was compiled. To test the POSIX capability of the machine at runtime to support POSIX use the following procedures:

  1. long sysconf(int name);
  2. long pathconf(const char *pathname, int name);
  3. long fpathconf(int fd, int name);

See the sysconf(3), pathconf(3), and fpathconf(3) man pages for information on the values supported by the function.

System POSIX Options

POSIX.1 Option values

  • _SC_JOB_CONTROL
  • _SC_SAVED_JOBS
  • _SC_VERSION
  • _SC_ARG_MAX
  • _SC_CHILD_MAX
  • _SC_CLK_TCK
  • _SC_NGROUPS_MAX
  • _SC_OPEN_MAX
  • _SC_STREAM_MAX
  • _SC_TZNAME_MAX

POSIX.4 Option Values

  • _SC_ASYNCHRONOUS_IO
  • _SC_MAPPED_FILES
  • _SC_MEMLOCK
  • _SC_MEMLOCK_RANGE
  • _SC_MEMORY_PROTECTION
  • _SC_MESSAGE_PASSING
  • _SC_PRIORITIZED_IO
  • _SC_PRIORITY_SCHEDULING
  • _SC_REALTIME_SIGNALS
  • _SC_SEMAPHORES
  • _SC_FSYNC
  • _SC_SHARED_MEMORY_OBJECTS
  • _SC_SYNCHRONIZED_IO
  • _SC_TIMERS
  • _SC_AIO_LIST_IO_MAX
  • _SC_AIO_MAX
  • _SC_AIO_PRIO_DELTA_MAX
  • _SC_DELAYTIMER_MAX
  • _SC_MQ_OPEN_MAX
  • _SC_MQ_PRIO_MAX
  • _SC_PAGESIZE
  • _SC_RTSIG_MAX
  • _SC_SEM_NSEMS_MAX
  • _SC_SEM_VALUE_MAX
  • _SC_SIGQUEUE_MAX
  • _SC_TIMER_MAX

File and Directory Related POSIX Options

POSIX.1 Option Values

  • _PC_CHOWN_RESTRICTED
  • _PC_NO_TRUNC
  • _PC_VDISABLE
  • _PC_LINK_MAX
  • _PC_MAX_CANNON
  • _PC_MAX_INPUT
  • _PC_NAME_INPUT
  • _PC_PATH_MAX
  • _PC_PIPE_BUF

POSIX.4 Option Values

  • _PC_ASYNC_IO
  • _PC_PRIO_IO
  • _PC_SYNC_IO