delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/09/25/04:24:50

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:to:cc:subject; q=dns; s=
default; b=VHTSGi70DOk+w4VlgbPhPn4q1Pxh1+gb1qC+XUbLbulH4yuTwGhEo
3IVTGbUdzObtMHBc7nKTYuNlLbzY2Cs4uS6pzlmuCD/m9wDOUFFR29IMfgl2LD/x
/JVd80qykMSLV59je6Fw6IX1qHGMWoHWK48cHQFq1ldgYkDaTKztQU=
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:to:cc:subject; s=default;
bh=gPSC2iRs7Zuhg2sEIWOE+YZAWa0=; b=IIkQZj8x9xVR4yOFb2M1NYBKEWEk
a/fXlEkkxR3eKJrO0Z6Dl3jEpwlE1egc3AI/w7kxBXSRZ71zRuKYh4tDxfMv307G
+lz6NYC9fDVZN45+QttNC3kxa7reRL6bE2RBsE6XtZH7XKg9w+3KelhkM/sknrgt
QG/E2RnhrzuxtGI=
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=3.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,FSL_HELO_NON_FQDN_1,RCVD_IN_PBL,RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: mail2.asahi-net.or.jp
Message-ID: <20130925172435.320@binki>
Date: Wed, 25 Sep 2013 17:24:35 +0900
From: wynfield AT gmail DOT com
To: <cygwin AT cygwin DOT com>
cc:
Subject: Perl and File Locking
X-IsSubscribed: yes

Re: Perl 5, version 14, subversion 2 (v5.14.2) 
    Cygwin: CYGWIN_NT-5.1  1.7.25(0.270/5/3

In Perl (I am attempting to open a file and put an exclusive lock on it to update
it like this:

###########################################

use Fcntl qw( O_RDWR  O_CREAT  O_NONBLOCK  O_EXLOCK );


     sysopen($FH, $fname, O_RDWR | O_CREAT | O_NONBLOCK |  O_EXLOCK, 0664)


############################################

Result on a test run give me the following error message:

"Your vendor has not defined Fcntl macro O_EXLOCK,"

Is it possible to develope perl code on cygwin that can use file locking to update data in a file from within perl?

Thank you.

--
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