I/O status Re: SPUG: proper checking of file status after read?
Brian Hatch
spug-list at l.ifokr.org
Fri Sep 19 03:59:04 CDT 2003
> Just made an ext2 partition on the very same box which has reiserfs (SuSE
> 8.2, Perl 5.8.0, patches) and tried the empty file test. Same error,
> Inappropriate ioctl for device. In an attempt at falsifiability, deleted
> the file and the error is No such file or directory on open (not read). I
> think that rules out reiserfs.
>
> The entirety of the program:
>
> #!/usr/bin/perl -w
> use strict;
>
> open (FOO, 'foo') or die "open: $!";
>
> my @lines = <FOO> or die "reading: $!";
>
> close FOO or die "close: $!";
>
> __END__
I can't see why this wouldn't work. I even ran it - works fine.
Can't imagine why it'd be giving you an ioctl error.
Try 'strace perl /path/to/script' and let's see exactly what
it's trying to do.
--
Brian Hatch We had the 80's
Systems and Then the 90's
Security Engineer And then what?
http://www.ifokr.org/bri/ The Naughties?
Every message PGP signed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/spug-list/attachments/20030919/a961bcdf/attachment.bin
More information about the spug-list
mailing list