From owner-freebsd-questions@FreeBSD.ORG Sun Dec 17 21:21:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BE1016A415 for ; Sun, 17 Dec 2006 21:21:29 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (pool-71-245-104-192.ptldor.fios.verizon.net [71.245.104.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id A62A843CBC for ; Sun, 17 Dec 2006 21:21:21 +0000 (GMT) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (localhost.home.localnet [127.0.0.1]) by schitzo.solgatos.com (8.13.8/8.13.6) with ESMTP id kBHLLKvj014295 for ; Sun, 17 Dec 2006 13:21:20 -0800 Received: from sopwith.solgatos.com (uucp@localhost) by schitzo.solgatos.com (8.13.8/8.13.4/Submit) with UUCP id kBHLLKEi014292 for freebsd-questions@freebsd.org; Sun, 17 Dec 2006 13:21:20 -0800 Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id UAA01723; Sun, 17 Dec 2006 20:53:52 GMT Message-Id: <200612172053.UAA01723@sopwith.solgatos.com> To: freebsd-questions@freebsd.org Date: Sun, 17 Dec 2006 12:53:52 +0000 From: Dieter Subject: write(2) takes > 17 seconds even with O_NONBLOCK X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@sopwith.solgatos.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Dec 2006 21:21:29 -0000 I've always thought that writing to a file descriptor with O_NONBLOCK set was supposed to return quickly. Isn't that the whole point of O_NONBLOCK ? I have a C program writing to stdout, which is set to O_NONBLOCK, and the shell redirects stdout to a regular disk file. Dispite O_NONBLOCK, my program reports that a write call took 17.701340 seconds.