in reply to How to do ioctl?
I have now tried to following which does what I want:
But it seems silly to me to resort to C just to issue an ioctl-call.use Inline "C"; open my $dev, "<", "/dev/input/event14" or die $!; grab($dev->fileno, 1); __END__ __C__ #include <linux/input.h> void grab(int fd, int act) { int r = ioctl(fd, EVIOCGRAB, act); printf("grab: %d\n", r); }
Does anybody know how to do this in pure Perl?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to do ioctl?
by Anonymous Monk on May 16, 2014 at 02:08 UTC | |
by morgon (Priest) on May 16, 2014 at 07:55 UTC | |
by Anonymous Monk on May 16, 2014 at 09:10 UTC |
In Section
Seekers of Perl Wisdom