Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 19 Jan 2002 07:30:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 19 Jan 2002 07:29:50 -0500 Received: from leibniz.math.psu.edu ([146.186.130.2]:11448 "EHLO math.psu.edu") by vger.kernel.org with ESMTP id ; Sat, 19 Jan 2002 07:29:34 -0500 Date: Sat, 19 Jan 2002 07:29:33 -0500 (EST) From: Alexander Viro To: Xavier Bestel cc: Matthias Schniedermeyer , "H. Peter Anvin" , Linux Kernel Mailing List Subject: Re: rm-ing files with open file descriptors In-Reply-To: <1011442962.25240.3.camel@bip> Message-ID: 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 On 19 Jan 2002, Xavier Bestel wrote: > On Sat, 2002-01-19 at 13:16, Matthias Schniedermeyer wrote: > > > > Well no. new_fd will refer to a completely new, empty file > > > > which has no relation to the old file at all. > > > > > > > > There is no way to recreate a file with a nlink count of 0, > > > > well that is until someone adds flink(fd, newpath) to the kernel. > > > > > > > > > > This *might* work: > > > > > > link("/proc/self/fd/40", newpath); > > > > cat /proc//fd/ > whatever > > actually works. > > Once it's unliked ? I doubt it. Egads... It certainly works, unlinked or not. Please learn the basics of Unix filesystem semantics. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/