use syscall.Open with O_NONBLOCK flag and os.NewFile after ioctls

so that the file is pollable.
This commit is contained in:
Song Gao 2019-01-06 20:50:07 +00:00
parent ab2cda57af
commit 5d0ec8c62b
2 changed files with 11 additions and 9 deletions

View file

@ -88,7 +88,7 @@ func TestCloseUnblockPendingRead(t *testing.T) {
close(c)
}()
// make sure ifce.Close() happens after ifce.Read()
// make sure ifce.Close() happens after ifce.Read() blocks
time.Sleep(1 * time.Second)
ifce.Close()