From 29b183b12cf80858cd00dd03b2493aca70b971b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 28 Mar 2005 21:45:56 +0000 Subject: [PATCH] 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 --- src/kernel/core/fs/vfs_select.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/kernel/core/fs/vfs_select.cpp b/src/kernel/core/fs/vfs_select.cpp index 36adfc4380..5a894c869c 100644 --- a/src/kernel/core/fs/vfs_select.cpp +++ b/src/kernel/core/fs/vfs_select.cpp @@ -1,7 +1,7 @@ -/* -** Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the Haiku License. -*/ +/* + * Copyright 2002-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Distributed under the terms of the MIT License. + */ #include @@ -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() } - if (count < 1) { - count = B_BAD_VALUE; - goto err; - } - status = acquire_sem_etc(sync.sem, 1, 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 _user_select(int numfds, fd_set *userReadSet, fd_set *userWriteSet, fd_set *userErrorSet, bigtime_t timeout, const sigset_t *userSigMask)