Created
May 26, 2012 08:10
-
-
Save kui/2792869 to your computer and use it in GitHub Desktop.
uinput に関わるとろくな目に合わない。これでも write で無限書き込みブロックが発生する。
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
t = Thread.new do | |
File.read '/dev/null' | |
end | |
file = open '/dev/uinput', 'w' | |
file.sync = true | |
file.write 'foo' # block | |
t.join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yay Ruby!!