On Mon, Apr 09, 2012 at 10:32:09PM +0100, Roger Burton West wrote:
>Under Linux amd64 and Perl 5.10.1, I'm trying to read from a pair of
>devices which will produce data in 16-byte blocks. (I can cat the device
>files - as the same user - and verify that they do this.)
>Under Perl 5.8 (and an earli
On Tue, Apr 10, 2012 at 10:51:27AM +0100, Dave Mitchell wrote:
>Unlikely to be the issue, but have you tested doing a single 16-byte read,
>e.g.
>dd if=/dev/foo of=/dev/null bs=16 count=1
dd: reading `/dev/input/event8': Invalid argument
...but open() doesn't fail, and cat still works.
OK,
On 09/04/12 22:32, Roger Burton West wrote:
while (1) {
my @ready=$s->can_read(0.5);
foreach my $fh (@ready) {
my $data;
my $y=sysread $fh,$data,16;
die $! unless defined $y;
# do stuff with $data
}
}
For what it is worth, I am running a similar loop which will cal
On Mon, Apr 09, 2012 at 10:32:09PM +0100, Roger Burton West wrote:
> Under Linux amd64 and Perl 5.10.1, I'm trying to read from a pair of
> devices which will produce data in 16-byte blocks. (I can cat the device
> files - as the same user - and verify that they do this.)
Unlikely to be the issue,
On Mon, Apr 09, 2012 at 02:52:10PM -0700, Yitzchak Scott-Thoennes wrote:
>You've probably switched from perl using stdio to using perlio.
The perl I have certainly has USE_PERLIO set.
>You
>could compile 5.10.1 with usestdio to see if that makes a difference.
>Or you could try a newer perl and s
On Mon, Apr 9, 2012 at 2:52 PM, Yitzchak Scott-Thoennes
wrote:
> Which strikes a vague bell...
Sorry, ring bells, strike chords.
On Mon, Apr 9, 2012 at 2:32 PM, Roger Burton West wrote:
> Under Linux amd64 and Perl 5.10.1, I'm trying to read from a pair of
> devices which will produce data in 16-byte blocks. (I can cat the device
> files - as the same user - and verify that they do this.)
>
> Under Perl 5.8 (and an earlier