From owner-freebsd-doc@FreeBSD.ORG Fri May 23 07:10:04 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4EB737B401 for ; Fri, 23 May 2003 07:10:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD18A43F93 for ; Fri, 23 May 2003 07:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4NEA3Up041504 for ; Fri, 23 May 2003 07:10:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4NEA3Gg041503; Fri, 23 May 2003 07:10:03 -0700 (PDT) Resent-Date: Fri, 23 May 2003 07:10:03 -0700 (PDT) Resent-Message-Id: <200305231410.h4NEA3Gg041503@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marc Olzheim Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B30237B401 for ; Fri, 23 May 2003 07:06:46 -0700 (PDT) Received: from serv1.ilse.net (serv1.ilse.nl [62.69.160.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB47143FAF for ; Fri, 23 May 2003 07:06:44 -0700 (PDT) (envelope-from marcolz@serv5.ilse.net) Received: from serv5.ilse.net (serv5.ilse.net [10.1.8.15]) by serv1.ilse.net (8.12.8/8.10.2) with ESMTP id h4NE6hxP099611 for ; Fri, 23 May 2003 16:06:43 +0200 (MEST) Received: (from marcolz@localhost) by serv5.ilse.net (8.12.8/8.12.4/Submit) id h4NE6gAJ038179; Fri, 23 May 2003 16:06:42 +0200 (CEST) Message-Id: <200305231406.h4NE6gAJ038179@serv5.ilse.net> Date: Fri, 23 May 2003 16:06:42 +0200 (CEST) From: Marc Olzheim To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/52612: [PATCH] close() can return undocumented ENOSPC X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Marc Olzheim List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 14:10:05 -0000 >Number: 52612 >Category: docs >Synopsis: [PATCH] close() can return undocumented ENOSPC >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri May 23 07:10:02 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Marc Olzheim >Release: FreeBSD 5.0-CURRENT i386 >Organization: ilse technology >Environment: FreeBSD office-install1.ilse.net 5.0-CURRENT FreeBSD 5.0-CURRENT #8: Tue Apr 29 11:21:52 CEST 2003 root@office-install1.ilse.net:/usr/obj/usr/src/sys/SMP i386 >Description: On cached for example NFS, close can return ENOSPC, indicating that it could not correctly write pending flushes to disk. It would be nice to have this documented. Also, the paragraph about why you should use close() yourself, made me wonder what kind of programming we were trying to promote here... >How-To-Repeat: NFS mount a dir, write enough to it (at least 4 Mb in my case, it's porbably some buffersize issue), then close() the file and see ENOSPC returned. >Fix: Patch follows: --- /usr/src/lib/libc/sys/close.2 Fri May 23 15:37:05 2003 +++ /usr/src/lib/libc/sys/close.2 Fri May 23 15:48:00 2003 @@ -71,11 +71,9 @@ file descriptor for that file is closed by that process. .Pp When a process exits, -all associated file descriptors are freed, but since there is -a limit on active descriptors per processes, the +all associated file descriptors are freed, as though the process called .Fn close -system call -is useful when a large quantity of file descriptors are being handled. +itself. .Pp When a process forks (see .Xr fork 2 ) , @@ -115,6 +113,8 @@ is not an active descriptor. .It Bq Er EINTR An interrupt was received. +.It Bq Er ENOSPC +The underlying object did not fit, cached data was lost. .El .Sh SEE ALSO .Xr accept 2 , >Release-Note: >Audit-Trail: >Unformatted: