Confused by sysread()

Roger Burton West roger at
Tue Apr 10 21:24:23 BST 2012

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 earlier i386 Linux), this worked. Now sysread()
>is failing with an "Invalid argument".

The answer appears to be that the structure returned by evdev_read() is
larger for 64-bit processes - changing from a 16- to a 24-byte read has
solved the problem. Thanks for the suggestions here.


More information about the mailing list