From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22313 invoked by alias); 9 Jan 2002 23:45:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22188 invoked from network); 9 Jan 2002 23:45:07 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 9 Jan 2002 23:45:07 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16OSPp-0004gW-00; Wed, 09 Jan 2002 18:45:53 -0500 Date: Wed, 09 Jan 2002 15:45:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: linux-proc readlink patch Message-ID: <20020109184553.A17940@nevyn.them.org> Mail-Followup-To: Kevin Buettner , Michael Snyder , gdb-patches@sources.redhat.com References: <20020109151622.A842@nevyn.them.org> <3C3CC1CD.798D57DB@redhat.com> <20020109181030.B6397@nevyn.them.org> <1020109234011.ZM1423@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1020109234011.ZM1423@localhost.localdomain> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00211.txt.bz2 On Wed, Jan 09, 2002 at 04:40:12PM -0700, Kevin Buettner wrote: > On Jan 9, 6:10pm, Daniel Jacobowitz wrote: > > > On Wed, Jan 09, 2002 at 02:18:53PM -0800, Michael Snyder wrote: > > > Nope, that's not the semantics. Cleanups are always done, no later than > > > when the command is finished executing (if not earlier). I even checked > > > to make sure that these were done. There's no memory leak. > > > > Well, the comments in utils.c are wrong, then :) > > > > > > (2) It is not, IIRC, always correct in the case of chroots. Handling for > > > > this has changed across Linux versions several times. On 2.2 it seems to be > > > > correct (to my surprise, actually), but I believe it is not on 2.0. Do we > > > > care? Probably not, as 2.0 is now -very- old. > > > > > > Well, if it fails, the code falls back to using the original /proc name. > > > > By fails, I meant that the output of readlink was not useful. But I > > don't think this is a concern. > > So the link was just wrong? If so, then opening /proc//exe won't work > either, right? > > If these old kernels managed to somehow open the right file but provide > an incorrect link via readlink(), I suppose we could stat() the file > to see if it exists. The link was 'magic' - its text was something along the lines of a device and inode number, I believe. It's not worth worrying about unless someone actually reports it broken, I think. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer