Created
October 6, 2018 17:03
-
-
Save Tilka/c35f65f73cae09209fd927836d345093 to your computer and use it in GitHub Desktop.
for some reason closing evdev file descriptors takes ~30 ms on my laptop :/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
int main() | |
{ | |
// leak 100 file descriptors, on exit the kernel will close them in one go | |
for (int i = 0; i < 100; ++i) | |
open("/dev/input/event0", O_RDONLY); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment