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: 338506 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id D77E1140088 for ; Fri, 11 Apr 2014 22:56:09 +1000 (EST) 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=uKgIe3SN57zKyUlcGeMf69wkbw+vFOh 6BZe9ckiadz0raQrWz+yEGFMvFVpvofFvjYfCaNAMj35du3OFifZoZMZBQKjtZdP QK1tS8K3mCfagp+5ev8GRCT69vlJh5Oo/cBqVSrCpQC4wsKkc+11l88GGll0ORC+ k/dRGC2lNA9g= 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=sanWM 18Ccx4BHUZOglk62Q/DGp8UlBllLpxJvYFglLDKRo3gDddRB+KLAubfpKthGBnDO tENmapeOSDdtfQBgZgFZaCGUOBlKY9mItCRa1E58hk1AmAmboUYoXH/7NBpk4H/3 K5vi4ONSfb8UNUCQURmM2v7tfJwemajFfofMTQ= 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> 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