select() is supposed to clear the sets in case of B_TIMED_OUT - found and patch

by Hugo Santos - thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20412 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-03-23 20:40:03 +00:00
parent 1fc17776e3
commit d349f3c941
+7
View File
@@ -183,9 +183,16 @@ common_select(int numfds, fd_set *readSet, fd_set *writeSet, fd_set *errorSet,
}
}
break;
case B_INTERRUPTED:
count = B_INTERRUPTED;
break;
case B_TIMED_OUT:
fd_zero(readSet, numfds);
fd_zero(writeSet, numfds);
fd_zero(errorSet, numfds);
// supposed to fall through
default:
// B_TIMED_OUT, and B_WOULD_BLOCK
count = 0;