From owner-freebsd-current@FreeBSD.ORG Thu Mar 30 09:05:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82EE216A400; Thu, 30 Mar 2006 09:05:55 +0000 (UTC) (envelope-from frank@pinky.sax.de) Received: from pinky.frank-behrens.de (pinky.frank-behrens.de [82.139.199.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AC0043D66; Thu, 30 Mar 2006 09:05:51 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from [192.168.20.31] (pulse.behrens [192.168.20.31]) by pinky.frank-behrens.de (8.13.4/8.13.4) with ESMTP/MSA id k2U95mXN031215; Thu, 30 Mar 2006 11:05:48 +0200 (CEST) (envelope-from frank@pinky.sax.de) Message-Id: <200603300905.k2U95mXN031215@pinky.frank-behrens.de> From: "Frank Behrens" To: freebsd-current@freebsd.org Date: Thu, 30 Mar 2006 11:05:46 +0200 MIME-Version: 1.0 Priority: normal In-reply-to: <20060330081619.GB736@turion.vk2pj.dyndns.org> References: <20060329224100.GB2293@elvis.mu.org> X-mailer: Pegasus Mail for Windows (4.31, DE v4.31 R1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Cc: deischen@freebsd.org, Peter Jeremy Subject: Re: _cleanup() vs Linux fcloseall() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 09:05:55 -0000 Peter Jeremy wrote on 30 Mar 2006 19:16: > On Thu, 2006-Mar-30 00:41:00 +0200, Maxime Henrion wrote: > >FWIW, NetBSD has something that close all the file descriptors, and it's > >done with fcntl(fd, F_CLOSEM) (using fcntl() on one file descriptor to > >close all of them looks a bit weird to me, but well...). > > If it close any fd's numerically greater than the passed fd, that would > make a lot of sense. Yes. It is also implemented in IBM AIX (and I believe in SGI IRIX, too). see http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/libs/basetrf1/fcntl.htm -- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available.