OSDN Git Service

Fix select failures when STDIN is ready.
authorChristopher Ferris <cferris@google.com>
Thu, 14 Jan 2016 06:38:09 +0000 (22:38 -0800)
committerChristopher Ferris <cferris@google.com>
Thu, 14 Jan 2016 06:38:09 +0000 (22:38 -0800)
commitdd926b57a00d0a7d3c861897af303ea1c454fa01
tree40f21d1d60cf5d216b69eba72756fe7f98aeec76
parent323900cd7dc2a2dc561563f6963806625d89e397
Fix select failures when STDIN is ready.

The select_smoke and pselect_smoke test can fail if STDIN has data ready
to be read. The easiest way to see the failure is to type on the command
line while running the tests.

To avoid this, allow the return value to be 2 or 3 and check which fds
are ready to be read.

Change-Id: Iafba332c5f3ed1943e3d34501f123dd45f06a8c4
tests/sys_select_test.cpp