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
0001118 [1003.1(2016)/Issue7+TC2] Base Definitions and Headers Comment Clarification Requested 2017-01-20 13:05 2017-01-20 14:36
Reporter rpalethorpe View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Richard Palethorpe
Organization SUSE
User Reference
Section fork, fcntl, flockfile
Page Number fork
Line Number 20ish
Interp Status ---
Final Accepted Text
Summary 0001118: Clarify meaning of "file lock"
Description In http://pubs.opengroup.org/onlinepubs/9699919799/ [^] (fork) it states that "File locks set by the parent process shall not be inherited by the child process.".

As far as I can tell, the phrase 'file lock', is not explicitly defined and there are at least two types of lock which could be described as a 'file lock'. One is the type of lock established by fcntl(), which states in its rationale that locks are not inherited through fork(). The other is a lock established by flockfile() which makes no mention of fork().

Furthermore, in this context, the term 'inherited' could be taken to mean that the lock's data structures are copied to the child or that the ownership of the lock is inherited by the child (i.e. the child can access a file locked by the parent) or that the child is subject to restrictions imposed by the locks (i.e. it can't access a locked file).

This may or may not be related to: http://austingroupbugs.net/view.php?id=1112 [^]
Desired Action 1. Explicitly state the types of lock meant by 'file lock'
2. Elaborate on the term 'inherit' in the context of file locks during a process fork or cite its definition.
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0003558)
rpalethorpe (reporter)
2017-01-20 14:36

This issue is an active source of confusion as a fork() test within the LTP/Open POSIX test suite has used one interpretation and glibc has used another. The test passes on older versions of glibc, but has now begun to fail.

Related discussion: https://bugzilla.novell.com/show_bug.cgi?id=1018908 [^]

- Issue History
Date Modified Username Field Change
2017-01-20 13:05 rpalethorpe New Issue
2017-01-20 13:05 rpalethorpe Name => Richard Palethorpe
2017-01-20 13:05 rpalethorpe Organization => SUSE
2017-01-20 13:05 rpalethorpe Section => fork, fcntl, flockfile
2017-01-20 13:05 rpalethorpe Page Number => fork
2017-01-20 13:05 rpalethorpe Line Number => 20ish
2017-01-20 14:36 rpalethorpe Note Added: 0003558


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