From mboxrd@z Thu Jan 1 00:00:00 1970 From: kkonaka@mac.com Subject: Re: LD_PRELOAD an anonymous file? Date: Fri, 13 Sep 2002 10:55:19 -0400 Sender: linux-c-programming-owner@vger.kernel.org Message-ID: References: <20020910105526.GA734@cam.ac.uk> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Return-path: In-Reply-To: <20020910105526.GA734@cam.ac.uk> List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: sos22@cam.ac.uk Cc: linux-c-programming@vger.kernel.org hi - thanks much! > A (very brief) test suggested that the links in /proc//fd > should still work. e.g. if file descriptor 3 points to what used to > be intercept.so, so will /proc//fd/3. brilliant! I've tried myself -- works fine :) (my program actually does exec() without doing fork(), so /proc/self/fd/ was just fine. also: /dev/fd/ worked equally okay on all of solaris2, linux, netbsd :) ) > In principle, it could probably be done with ptrace() and the rest > of the debugging API, but it wouldn't be much fun. hmm., never thought about that direction - I'll think about it. thanks again!! kenji :)