Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Aug 2002 11:29:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Aug 2002 11:29:52 -0400 Received: from host169.digeo.com ([12.110.81.169]:1157 "EHLO khem.blackfedora.com") by vger.kernel.org with ESMTP id ; Tue, 27 Aug 2002 11:29:51 -0400 To: linux-kernel@vger.kernel.org Subject: How can a process easily get a list of all it's open fd? From: Mark Atwood Date: 27 Aug 2002 08:34:04 -0700 In-Reply-To: <200208270138.g7R1ckGx001985@eeyore.valparaiso.cl> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1300 Lines: 35 I need to close all the none std[in|out|err] open fd's. I've been told to do it like so: { int i; for (i=3; i