View Issue Details

IDProjectCategoryView StatusLast Update
00002761003.1(2008)/Issue 7System Interfacespublic2011-06-23 15:32
Reporterfahree Assigned To 
PrioritynormalSeverityCommentTypeClarification Requested
Status ClosedResolutionRejected 
NameFrancois-Rene Rideau
Organization
User Reference
Section(section number or name, can be interface name)
Page Number(page or range of pages)
Line Number(Line or range of lines)
Interp Status---
Final Accepted Text
Summary0000276: declare vfork as async signal safe
DescriptionSince fork calls pthread_atfork handlers and cannot be async signal safe, could vfork be declared async signal safe, and could it be declared that between vfork and exec, any other async signal safe function could be called?

That would allow for posix_spawn and extensions thereof to be implemented in terms of vfork.
Desired ActionDeclare vfork async signal safe.
Declare that in the vfork'ed process, any async signal safe function can be called.
TagsNo tags attached.

Relationships

related to 0000062 Closedajosey Is it correct to list fork as an async-signal safe interface 

Activities

fahree

2010-07-02 15:56

reporter   bugnote:0000456

Related to issues 18 and 62.

geoffclare

2010-07-08 09:20

manager   bugnote:0000458

Last edited: 2010-07-29 15:22

There is no vfork() function in the current standard.

fahree

2010-07-29 15:25

reporter   bugnote:0000477

It's of course OK if you ultimately decide to reject the issue, but could you at least include a rationale or explanation or note as to why the issue doesn't need be solved?

fahree

2010-07-29 15:26

reporter   bugnote:0000478

Note: vfork could be added back to the standard, in a way that is trivially backward compatible with previous standards and common practice.

fahree

2010-07-29 15:27

reporter   bugnote:0000479

The issue being: fork does no more do some of the things it used to do, and there is currently no valid replacement for it in those contexts.

geoffclare

2010-08-19 15:39

manager   bugnote:0000528

Last edited: 2010-08-19 15:41

The vfork() function had heavy restrictions on the child process.
Quoting SUSv3:

   the behavior is undefined if the process created by vfork() either
   modifies any data other than a variable of type pid_t used to store
   the return value from vfork(), or returns from the function in
   which vfork() was called, or calls any other function before
   successfully calling _exit() or one of the exec family of
   functions.

Therefore it is not a suitable solution to the issue of fork()
async-signal-safety. The solution the group has decided to adopt is
to add an _Fork() function in the next revision, as per 0000062

Issue History

Date Modified Username Field Change
2010-07-02 15:56 fahree New Issue
2010-07-02 15:56 fahree Name => Francois-Rene Rideau
2010-07-02 15:56 fahree Note Added: 0000456
2010-07-08 09:20 geoffclare Note Added: 0000458
2010-07-16 21:07 msbrown Project Aardvark Bugs => 1003.1(2008)/Issue 7
2010-07-29 15:02 msbrown Section => (section number or name, can be interface name)
2010-07-29 15:02 msbrown Page Number => (page or range of pages)
2010-07-29 15:02 msbrown Line Number => (Line or range of lines)
2010-07-29 15:02 msbrown Interp Status => ---
2010-07-29 15:02 msbrown Category Aardvark Mk III => System Interfaces
2010-07-29 15:21 msbrown Resolution Open => Rejected
2010-07-29 15:22 geoffclare Note Edited: 0000458
2010-07-29 15:23 msbrown Status New => Closed
2010-07-29 15:25 fahree Note Added: 0000477
2010-07-29 15:25 fahree Status Closed => Under Review
2010-07-29 15:25 fahree Resolution Rejected => Reopened
2010-07-29 15:26 fahree Note Added: 0000478
2010-07-29 15:27 fahree Note Added: 0000479
2010-08-19 15:39 geoffclare Note Added: 0000528
2010-08-19 15:40 geoffclare Resolution Reopened => Rejected
2010-08-19 15:41 nick Relationship added related to 0000062
2010-08-19 15:41 geoffclare Note Edited: 0000528
2011-06-23 15:32 msbrown Status Under Review => Closed