From patchwork Fri Apr 11 12:55:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 504 X-Patchwork-Delegate: carlos@redhat.com Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id C54D636007A for ; Fri, 11 Apr 2014 05:56:06 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 6B02D119A114; Fri, 11 Apr 2014 05:56:06 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 46796119EA3F for ; Fri, 11 Apr 2014 05:56:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=O5nl/i5Womzaz0MOL8bq2ScgeX0N3yi JP74ZjXj2P763Ddo9c3rEAJllVsHh25kIWC4I4nuJOOoFTK9czaTwzeIgGgje2Qp c8QI2jaGHVBF4jjhIXoZfjWOuPCvoyIMXa0md06nqBGR0JsRTnj/ZzSvLdTZQW9+ BD81WPxG54hk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=VPLwmDPNXrq9NlJ+C/ZXrQ8RLcA=; b=Z0WtN cWK9mN2RJh0uNCfI05HsElcsm4FOestwDXGOmH29cuzjfFLjLttLjbmoyVv3nHjz pMHDtXRkpysEkrQPlMtzgDMwLHCH3YBzBvD349/3+ce0VfMyUCMSvoC+dgI8RjIM fGFOfdTYmjjdxPamEIwTZMzJeAql8wWJ3l0KlU= Received: (qmail 11232 invoked by alias); 11 Apr 2014 12:55:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11207 invoked by uid 89); 11 Apr 2014 12:55:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-qa0-f45.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=2fMqFDmpSOkakKX7S7m3RpKAW9KBgoG0++bZ4SJ9tho=; b=eEmuRnMBvYNg1dBV7ZfrdIhsU5F2dXZERRgwmEDBXmbf4QeKK6WUYcC8CNcAfcGPqn k+dMINT+ULxf6ljmcPvXgLuLedD7UH95a4QHs/lJLPR9yd8N4tg6OIp7o7Yps5aND7QU 4snN5ypo/jqQEBjBsmOCva0eIyEwQIh2SgCF4sj4SA2mcMRgB3Q2ddg6DaHEBKLgMbNy 9+m1CaSHWpcqZ4g81HxYjbVlJLU1ymoKf5/pl+MRqpUFLKVTGDUhQYeAOVbFG9yM0k42 udPiu4xppXnGXaTt5oFYUcXCX/SOd4M1roO6TDYYYgs8umTzlH2WzO5n7RfPYaHx2SpX Xfzg== X-Gm-Message-State: ALoCoQmgDCsaeVTO63BnJyLnZLCUdBtvWDHJQ0Xe2A9wLoNm3Xha2M4onbAdsdaledVGCfX4CuKN X-Received: by 10.140.102.167 with SMTP id w36mr27039260qge.43.1397220952487; Fri, 11 Apr 2014 05:55:52 -0700 (PDT) From: Jeff Layton To: libc-alpha@sourceware.org Subject: [PATCH v2 1/2] fcntl-linux.h: add new definitions for file-private lock cmd values Date: Fri, 11 Apr 2014 08:55:44 -0400 Message-Id: <1397220945-11926-2-git-send-email-jlayton@redhat.com> In-Reply-To: <1397220945-11926-1-git-send-email-jlayton@redhat.com> References: <1397220945-11926-1-git-send-email-jlayton@redhat.com> X-DH-Original-To: glibc@patchwork.siddhesh.in Signed-off-by: Jeff Layton --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5708d4eb64c2..55a84e598e46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-04-11 Jeff Layton + + * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: + (F_GETLKP, F_SETLKP, F_SETLKPW): New macros. + 2014-04-11 Stefan Liebler * sysdeps/s390/s390-32/configure.ac: Unify file with ... diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h index 915eb3ede560..ae8ec1598a15 100644 --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h @@ -117,6 +117,25 @@ # define F_SETLKW64 14 /* Set record locking info (blocking). */ #endif +/* fd "private" POSIX locks. + + Usually POSIX locks held by a process are released on *any* close and are + not inherited across a fork. + + These cmd values will set locks that conflict with normal POSIX locks, but + are "owned" by the opened file, not the process. This means that they are + inherited across fork like BSD (flock) locks, and they are only released + automatically when the last reference to the the open file against which + they were acquired is put. + */ +#ifdef __USE_GNU +# ifndef F_GETLKP +# define F_GETLKP 36 +# define F_SETLKP 37 +# define F_SETLKPW 38 +# endif +#endif + #ifdef __USE_LARGEFILE64 # define O_LARGEFILE __O_LARGEFILE #endif