Opened 7 years ago

Closed 6 years ago

#8661 closed bug (fixed)

fcntl(fd, F_GETLK, ...) violates POSIX

Reported by: pdziepak Owned by: pdziepak
Priority: normal Milestone: R1
Component: System/POSIX Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

The standard states that F_GETLK should check whether given lock would be blocked by another one and return description of the conflicting one (or set l_type to F_UNLCK if there is no collision).

Current implementation of F_GETLK performs completely different actions, it "Retrieves the first lock that has been set by the current team". Moreover, if there are no locks (advisory_locking == NULL) an error is returned instead of l_type set to F_UNLCK.

Attachments (1)

0001-Fix-8661-fcntl-fd-F_GETLK-.-violates-POSIX.patch (3.9 KB) - added by pdziepak 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by pdziepak

Has a Patch: set

comment:2 Changed 7 years ago by nielx

Could somebody please review the patch?

comment:3 Changed 7 years ago by bonefish

Owner: changed from nobody to axeld
Status: newassigned

comment:4 Changed 6 years ago by pdziepak

Owner: changed from axeld to pdziepak

comment:5 Changed 6 years ago by pdziepak

Resolution: fixed
Status: assignedclosed

Fixed in hrev45359.

Note: See TracTickets for help on using tickets.