From 9650bbd776e871733e93f4ffc26a20cab84acd64 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 19 Jan 2014 00:21:45 +0100 Subject: [PATCH] Document select(2) as obsolete. --- doc/obsolete-stuff | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/obsolete-stuff b/doc/obsolete-stuff index f8863cdb..579ecba4 100644 --- a/doc/obsolete-stuff +++ b/doc/obsolete-stuff @@ -170,6 +170,18 @@ settimeofday Use clock_settime instead. +select +------ + +The fd_set system is poorly designed and the FD_SETSIZE is considerably smaller +than INT_MIN on most systems, which violates that the value of the file +descriptor shouldn't matter as long as it is between 0 and INT_MAX. It would be +better to use poll instead. There is also the problem that select uses struct +timeval instead of the superior struct timespec, though pselect solves tha +particular problem. + +Sortix currently provides this function for compatibility reasons. + strings.h ---------