delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/09/25/10:26:10

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=se8xfEinDIryd6ytjnkvdiiaGcccuh9LAHs1pg7/hLO
EgWwkafxkr8buEURMhLKppARLatlUDWa8LjuxeEgaluvQNY4RIhWRMJ4qytVVrBp
jBm/EnGd4VuFqkM9s9S0m8qr6MqTbEnPF726SM6MTPto7bnrucxYiAogsKha5FIg
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=lkuZZjq8N0ewzpNfS3X08PkZHTY=; b=asPxtsgBUWoEayuU2
0r01KLYCI9PEw0Mdqj2xLzD/SxbxnJQZ+Dgj9wZZy59pYlBqwfXcKUzLfoFLWXxb
NU85Q6WaTVqO6s6RObNNgbiNt+M2PgQa0qOqawRMSuiSKXF5mwzOa2KC7WOMOsuT
MZcogAUz9W89a/oRgx0ATewT94=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_40,RCVD_IN_PBL,RDNS_NONE autolearn=no version=3.3.2
X-HELO: etr-usa.com
Message-ID: <5242F270.3090003@etr-usa.com>
Date: Wed, 25 Sep 2013 08:25:52 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: Perl and File Locking
References: <20130925172435 DOT 320 AT binki>
In-Reply-To: <20130925172435.320@binki>
X-IsSubscribed: yes

On 9/25/2013 02:24, wynfield AT gmail DOT com wrote:
>
> "Your vendor has not defined Fcntl macro O_EXLOCK,"

O_EXLOCK is a BSD feature, and Cygwin tries to emulate Linux, not BSD.

Minimal testing tells me you can use Cygwin's nonstandard 
F_LCK_MANDATORY feature from Perl.  This script, foo.pl, doesn't die:

     #!/usr/bin/perl
     sysopen my $fh, "foo.pl", 0600, O_RDONLY or die "sysopen: $!\n";
     fcntl $fh, 0x99, 1 or die "fcntl: $!\n";

Whether it actually does what you expect is a different question.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019