There is code in VMS.C (see is_null_device())that attempts to explicitly handle
the NL: device and return r/w for it. My guess is that stat()/fstat() don't
work the same way in VMS as it does in Unices for devices, especially NL:, so
there has to be explicit coding.
Well, something's wrong, because I've verified the behavior here, but the code
seems to be in place to handle this.
I don't know if I'll have a chance to look at this. In any case, it might be a
good idea to add a test for this code to the standard tests. I'm not sure, but
I wouldn't be at all surprised if this is something that is easily broken on
Windows system, too, although today it seems to work as you'd expect.
Note that this issue isn't entirely clearcut, as one could protect /dev/null on
a UNIX system and different things would be returned from the test that what
you'd expect. If you really wanted to make it as much like UNIX as possible,
you'd have the tests actually check the device protections (they are all RWLP on
my system) and return
accordingly.
Jordan Henderson
Compaq Services - Contracted to DAASC
Phone: (937) 656 3804
"If you are angry with someone, walk a mile in their shoes, then you'll be a
mile away from them and they'll be barefoot."
-Author Unknown
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 24, 2001 10:05 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: File access feature with NL: - is this a VMS bug?
>
>
> "BAZLEY, Sebastian" <[EMAIL PROTECTED]> wrote on
> Thu, 24 May 2001 11:57:40 +0100 in
> <FB30E6123B22D211B52800A0C9CFBB1901C7A5FC@LONES2>:
>
> > Just noticed (Perl 5.005_3 PCSI kit) that
> >
> > -e "NL:" and -z "NL:" are true, however
> >
> > -r "NL:" is false, as is -w "NL:"
> >
> > though NL: is both writable and readable ...
> >
> > The equivalent on WinNT (NUL) and OSF1 (/dev/null) return
> TRUE for -e, -r,
> > -z, and -w, as I would expect.
> >
> > I think that it would be better to agree with the other OSes.
> >
> > What do others think?
>
> It should be the same on all OSes.
>
> Ed James [EMAIL PROTECTED]
> TeleCommunications Systems, Inc. voice 410-295-1919
> 2024 West Street, Suite 300 800-810-0827 x1919
> Annapolis, MD 21401-3556 fax 410-280-1094
>