select() doesn't care about obvious user errors: if it's called without
any chance to come back (without being signaled), it now will. For example, this is used by the sleep command (which now actually works as it should :)). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12110 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2002-2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2002-2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <vfs.h>
|
#include <vfs.h>
|
||||||
@@ -130,11 +130,6 @@ common_select(int numfds, fd_set *readSet, fd_set *writeSet, fd_set *errorSet,
|
|||||||
// array position is the same as the fd for select()
|
// array position is the same as the fd for select()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count < 1) {
|
|
||||||
count = B_BAD_VALUE;
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
status = acquire_sem_etc(sync.sem, 1,
|
status = acquire_sem_etc(sync.sem, 1,
|
||||||
B_CAN_INTERRUPT | (timeout != -1 ? B_RELATIVE_TIMEOUT : 0), timeout);
|
B_CAN_INTERRUPT | (timeout != -1 ? B_RELATIVE_TIMEOUT : 0), timeout);
|
||||||
|
|
||||||
@@ -478,6 +473,10 @@ _kern_poll(struct pollfd *fds, int numfds, bigtime_t timeout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark -
|
||||||
|
// User syscalls
|
||||||
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
_user_select(int numfds, fd_set *userReadSet, fd_set *userWriteSet, fd_set *userErrorSet,
|
_user_select(int numfds, fd_set *userReadSet, fd_set *userWriteSet, fd_set *userErrorSet,
|
||||||
bigtime_t timeout, const sigset_t *userSigMask)
|
bigtime_t timeout, const sigset_t *userSigMask)
|
||||||
|
|||||||
Reference in New Issue
Block a user