This is the mail archive of the
mailing list for the Cygwin project.
Re: Perl and File Locking
- From: Warren Young <warren at etr-usa dot com>
- To: Cygwin-L <cygwin at cygwin dot com>
- Date: Wed, 25 Sep 2013 08:25:52 -0600
- Subject: Re: Perl and File Locking
- Authentication-results: sourceware.org; auth=none
- References: <20130925172435 dot 320 at binki>
On 9/25/2013 02:24, firstname.lastname@example.org 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:
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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple