<assertions>
  <assertion id="1" tag="ref:XSH6:31030:31034">
   The function

   int pthread_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void))

   shall declare fork handlers to be called before and after a fork() command, in the context
   of the thread that called the fork().  The 'prepare' fork handler shall be called before
   fork() processing commences.  The 'parent' fork handle shall be called after fork()
   processing completes in the parent process.  The 'child' fork shall be called after
   fork() processing completes in the child process.
  </assertion>

  <assertion id="2" tag="ref:XSH6:31034:31035">
  If no handling is desired at one or more of these three points, the corresponding fork
  handler address(es) may be set to NULL.
  </assertion>

  <assertion id="3" tag="ref:XSH6:31040:31041">
  Upon successful completion, pthread_atfork() shall return a value of zero; otherwise an
  error number shall be returned to indicate the error:

  [ENOMEM] - insufficient table space exists to record the fork handler addresses.

  The function shall not return an error code of [EINTR]
  </assertion>
  <assertion id="4" tag="ref:XSH6TC2:31696:31698">
  When pthread_atfork is called several times, the prepare handlers are
executed in reversed order as they were registered, and child and parent
handlers are executed in the same order as they were registered.
  </assertion>
</assertions>
