From owner-freebsd-hackers Fri Jul 2 21:27:38 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id 1AD6914F26 for ; Fri, 2 Jul 1999 21:27:36 -0700 (PDT) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id XAA25275; Fri, 2 Jul 1999 23:27:36 -0500 (CDT) Received: from free.pcs (free.PCS [148.105.10.51]) by right.PCS (8.6.13/8.6.4) with ESMTP id XAA22288; Fri, 2 Jul 1999 23:27:35 -0500 Received: (from jlemon@localhost) by free.pcs (8.8.6/8.8.5) id XAA17423; Fri, 2 Jul 1999 23:27:34 -0500 (CDT) Date: Fri, 2 Jul 1999 23:27:34 -0500 (CDT) From: Jonathan Lemon Message-Id: <199907030427.XAA17423@free.pcs> To: wayne@crb-web.com, hackers@freebsd.org Subject: Re: poll() vs select() X-Newsgroups: local.mail.freebsd-hackers In-Reply-To: Organization: Architecture and Operating System Fanatics Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: >now supports the select() and poll() system calls. My question is really one >of usage. Why would one us poll() over select()? Is select eventually going >to go away for some reason? select() as a user-level call will never go away; there is a large base of code that uses it. poll() is faster (it doesn't have to do bit twiddling), and it's interface is cleaner (it can report invalid fd's, something select() can't do). As its functionality is a superset of select()'s, it is used as the internal implementation for select(). As for new code, use whichever you are comfortable with. Personally, I would recommend poll(), since it provides some added functionality over select() that makes for easier programming. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message