From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 1 04:34:26 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB79D1065674 for ; Mon, 1 Aug 2011 04:34:26 +0000 (UTC) (envelope-from bvgastel@bitpowder.com) Received: from smtp10.mail.sp.isp-net.nl (smtp10.mail.sp.isp-net.nl [217.149.192.65]) by mx1.freebsd.org (Postfix) with ESMTP id 6C40E8FC12 for ; Mon, 1 Aug 2011 04:34:25 +0000 (UTC) Received: from bitpowder.com by smtp10.mail.sp.isp-net.nl via 28-53-223.ftth.xms.internl.net [85.223.53.28] with ESMTP for id p6VJxoWM017730 (8.13.2/2.04); Sun, 31 Jul 2011 21:59:50 +0200 (MEST) Received: from [10.0.42.5] (shell [10.0.42.20]) by bitpowder.com (Postfix) with ESMTPA id A3CC11112001 for ; Sun, 31 Jul 2011 20:00:53 +0000 (UTC) From: Bernard van Gastel Content-Type: multipart/signed; boundary="Apple-Mail=_195B80BE-B7A7-412D-BE16-7032DBFD4732"; protocol="application/pkcs7-signature"; micalg=sha1 Date: Sun, 31 Jul 2011 21:59:48 +0200 Message-Id: To: hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-Language-Detected: en X-Spam-Scanned: InterNLnet Mail Scan System V2.03 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: eliminating a syscall on accept()+ioctl() combo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 04:34:26 -0000 --Apple-Mail=_195B80BE-B7A7-412D-BE16-7032DBFD4732 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi all, I want to reduce the number of syscalls for my networking application. = The app handles incoming connections with the 'accept()' system call. Is = there a way to specify to accept() that the newly created file = descriptors should be non-blocking (FIONBIO)? This will avoid an ioctl() = after the accept(). Thanks! With regards, Bernard= --Apple-Mail=_195B80BE-B7A7-412D-BE16-7032DBFD4732--