"Failed to open file descriptor" on shutdown
Apologies if this is not an evsieve issue, but I'm not sure what else it could be.
I use the most recent release version of evsieve, 1.4.0, on Arch Linux; I will soon check if this still occurs at the present commit.
I have a short script that calls evsieve and is run shortly after the X server is up (I boot into tty and use startx).
#!/bin/bash
sleep 3 &&
evsieve --input /dev/input/by-id/usb-ITE_Tech._Inc._ITE_Device_8176_-event-kbd \
--hook key:numlock exec-shell="sudo -u asuka bash /usr/local/bin/xkbset.sh"
When shutting down, systemd attempts to close all processes. However, it inconsistently (about 1 in 4 times) will log "Failed to open pidfd for process 1812: No such process" or similar, where 1812 is the pid of the bash script, rather than of evsieve itself.
Previously I used to run this script directly in .xinitrc. The error message was slightly different then: "Failed to open pidfd for process 1812: Invalid argument". Every time it occurred it caused the entire user session to get SIGKILLed on shutdown.
Curiously, even if I raise the sleep time to 30 seconds and shut down before evsieve is even run, this still occurs. However, it does not occur if I comment out evsieve, or if I replace it with a different script.