Open vimagick opened 8 years ago
Do we know if this only happens in a container? At first glance, Python 2 appears to be using readv
here Python 3 is not:
Python 2:
open("/dev/input/by-path/platform-i8042-serio-0-event-kbd", O_RDONLY) = 3
fstat(3, {st_mode=S_IFCHR|0660, st_rdev=makedev(13, 66), ...}) = 0
readv(3, 0x7ffd72898280, 2) = -1 EINVAL (Invalid argument)
writev(2, [{"", 0}, {"Traceback (most recent call last):\n", 35}], 2Traceback (most recent call last):
) = 35
Python 3:
open("/dev/input/by-path/platform-i8042-serio-0-event-kbd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFCHR|0660, st_rdev=makedev(13, 66), ...}) = 0
ioctl(3, TIOCGWINSZ, 0x7fffb343a570) = -1 EINVAL (Invalid argument)
lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Invalid seek)
read(3, ^Cstrace: Process 18 detached
Not yet sure if related...
Python2 open().read()
works well outside of alpine container.
I'm trying to read usb keyboard inside
alpine
docker container.Run container
Run python2 (Raise error)
Run python3 (No error)