Defect Report concerning: IEEE Std. 1003.1c-1995, ISO/IEC 9945-1:1990 AMD 2 - Threads
Clause: 3.1.3.1
PASC Interpretation Ref: pasc-1003.1c-09
Topic: pthread_atfork()


This is an unapproved interpretation of PASC 1003.1c-1995, ISO/IEC 9945-1:1990 AMD 2 - Threads.

Use of the information contained in this unapproved document is at your own risk.

Last update: 30 March,1998


								1003.1c-95  #9

 _____________________________________________________________________________

	Interpretation Number:	XXXX
	Topic:               pthread_atfork()
	Relevant Sections:   3.1.3.1

	From: Andrew Josey
	Date: Wed Jul 10 15:50:23 BST 1996

Interpretation Request: (Defect Report)
-----------------------

This is related to Interpretation reference P1003.1c-95 #04 
and the inter-relation between P1003.1c and P1003.2. 
Interpretation P1003.1c-95 #04 stated:

> The P1003.1b-1993 standard, to which P1003.1c is an amendment, on page 39
> section 2.7.3 lines 1119 to 1121, states that "if a function is not listed
> below, it shall have its prototype appear in <unistd.h>..".  pthread_atfork is
> not listed, so the standard is clear that it shall be listed in <unistd.h>.
>

P1003.2 states that the functions in <unistd.h> are made
available, when -l c is the argument to c89:

POSIX.2 lines 167-169 page 691 states " -l c This
library contains all library functions referenced in <stdlib.h>, <stdio.h>,
<time.h>, <setjmp.h>, <signal.h>, <unistd.h>...".

Is it thus the correct interpretation for 1003.1c that 
the pthread_atfork() function be in the standard library
found with the -l c argument?

I'd propose that this be in a libary other than that
named found by "-l c".              

Interpretation response
------------------------

The response of the P1003.1c Interpretations committee is:

The standard is clear that pthread_atfork() is made available by the
-l c argument to c89.  As stated in interpretation P1003.1c-95 #4:
    The P1003.1b-1993 standard, to which P1003.1c is an amendment,
    on page 39 section 2.7.3 lines 1119 to 1121, states that "if a
    function is not listed below, it shall have its prototype appear
    in <unistd.h>.".  pthread_atfork is not listed, so the standard
    is clear that it shall be listed in <unistd.h>.
and
P1003.2 says:
     the functions in <unistd.h> are made available when -l c is the
     argument to c89.

However, it is the belief of the interpretations committee that this
is not what was intended by the working group or the balloting group.
The rationale in informative annex C, page 593, line 183, lists
pthread_atfork() as being defined in <pthread.h>.  Additionally, the
"pthread_" function is the only one made available by the -l c
argument to c89 is pthread_atfork(), which does not give the user of
the standard a useful set of functions.  This issue is being referred
to the sponsor for consideration.                

Rationale
-------------
None.
Forwarded to Interpretations group: July 12th 1996
Finalised: 3 Sep 96