Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000858 [1003.1(2013)/Issue7+TC1] System Interfaces Comment Clarification Requested 2014-07-11 14:31 2014-07-17 16:27
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Accepted  
Status Resolved  
Name Geoff Clare
Organization The Open Group
User Reference
Section pthread_atfork()
Page Number 1543
Line Number 50230,50244
Interp Status ---
Final Accepted Text
Summary 0000858: highlight the dangers of using pthread_atfork()
Description A separate bug is needed for the changes proposed in Note: 0002287
since these are suitable for TC2 but the changes to address 0000851 will
need to wait for Issue 8.

The aim here is make the warnings of the dangers of using pthread_atfork()
(which are currently buried in the RATIONALE) more prominent for the
benefit of application writers.
Desired Action After page 1543 line 50230 add a new paragraph:

If a fork() call in a multi-threaded process leads to a child fork handler calling any function that is not async-signal-safe, the behavior is undefined.

On page 1543 line 50244 change the APPLICATION USAGE section from:

None.

to:

The original usage pattern envisaged for pthread_atfork() was for the prepare fork handler to lock mutexes and other locks, and for the parent and child handlers to unlock them. However, since all of the relevant unlocking functions, except sem_post(), are not async-signal-safe this usage results in undefined behavior in the child process unless the only such unlocking function it calls is sem_post().

On page 1545 line 50308 change the FUTURE DIRECTIONS section from:

None.

to:

The pthread_atfork() function may be formally deprecated (for example by shading it OB) in a future revision of this standard.

On page 889 line 29741 section fork() delete:

Fork handlers may be established by means of the pthread_atfork() function in order to maintain application invariants across fork() calls.
Tags tc2-2008
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-07-11 14:31 geoffclare New Issue
2014-07-11 14:31 geoffclare Name => Geoff Clare
2014-07-11 14:31 geoffclare Organization => The Open Group
2014-07-11 14:31 geoffclare Section => pthread_atfork()
2014-07-11 14:31 geoffclare Page Number => 1543
2014-07-11 14:31 geoffclare Line Number => 50230,50244
2014-07-11 14:31 geoffclare Interp Status => ---
2014-07-17 16:27 Don Cragun Status New => Resolved
2014-07-17 16:27 Don Cragun Resolution Open => Accepted
2014-07-17 16:27 Don Cragun Tag Attached: tc2-2008


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker