From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA15847; Sat, 23 Aug 2003 19:03:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA20794 for ; Sat, 23 Aug 2003 19:03:22 +0200 (MET DST) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h7NH1pT20883 for ; Sat, 23 Aug 2003 19:03:22 +0200 (MET DST) Received: from 12-203-149-172.client.attbi.com ([12.203.149.172]) by ux9.sp.cs.cmu.edu id aa20085; 23 Aug 2003 12:59 EDT Received: from ecc by stratocaster.home with local (Exim 3.36 #1 (Debian)) id 19qbjQ-0000G8-00 for ; Sat, 23 Aug 2003 12:59:16 -0400 Date: Sat, 23 Aug 2003 12:59:16 -0400 To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Unix.chdir and backtrace Message-ID: <20030823165916.GA956@ecooper.com> Mail-Followup-To: caml-list@pauillac.inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: "Eric C. Cooper" X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 backtrace:01 lindows:01 backtrace:01 argv:01 pathname:01 foo:01 strace:01 foo:01 runtime:01 caml:01 0700,:01 unix:02 unix:02 failing:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Aug 23, 2003 at 06:58:22AM -0700, david.fox@lindows.com wrote: > Just a quick note to let everyone know that backtrace stops working > when your program uses Unix.chdir to change directory and argv[0] is > a relative pathname, like "./foo". The output of strace shows it > trying to open ./foo and failing. It might be a good idea to apply > realpath(3) to this path before the program runs. At least on Linux, the runtime system can just open "/proc/self/exe" rather than attempting to open caml_exe_name. -- Eric C. Cooper e c c @ c m u . e d u ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners