www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/03/27/02:17:21

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Fri, 27 Mar 2009 08:14:56 +0100
From: "Juan Manuel Guerrero" <juan DOT guerrero AT gmx DOT de>
Message-ID: <20090327071456.132760@gmx.net>
MIME-Version: 1.0
Subject: Re: Dificulty using open() with O_EXCL on Windows 2000
To: djgpp AT delorie DOT com
X-Authenticated: #27081556
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
X-Priority: 3
X-Provags-ID: V01U2FsdGVkX1+IDS88j72IAb3laf2b3J1lISP8JU8/OROULkZO8s
ipEU2RTvjTbgOnH+Do1pqNlHxNEqwtNh9y9w==
X-GMX-UID: uDqqI7RFaHIteC5puyQlrYRiamdhZMS8
X-FuHaFi: 0.6

OFYI:
Inspecting and debuging the Perl 5.6.1 port shows that it uses a different mode.
  mode = 0x0301 = O_EXCL|O_CREAT|O_WRONLY
That works with Win2K and is different from the mode used by Perl 5.8.8 and 5.8.9:
  mode = 0x8386 = O_NOFOLLOW|O_EXCL|O_CREAT|O_NOINHERIT|O_BINARY|O_RDWR

Playing around with the mode options shows that O_EXCL and O_NOINHERIT
seem to be mutualy exclusive.  On Win2K the mode:
  O_NOFOLLOW|O_EXCL|O_CREAT|O_BINARY|O_RDWR
and
  O_NOFOLLOW|O_CREAT|O_NOINHERIT|O_BINARY|O_RDWR
work but the mode combination used nowadays by Perl will not work on Win2K
at all.  Of course, there may be more combinations that do not work on Win2K,
but for my purposes I know now the one I need. I will suppress O_NOINHERIT.


Regards,
Juan M. Guerrero
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

- Raw text -


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