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 PAA00115; Sat, 23 Aug 2003 15:58:26 +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 PAA25841 for ; Sat, 23 Aug 2003 15:58:24 +0200 (MET DST) Received: from dsf (adsl-63-196-84-93.dsl.sndg02.pacbell.net [63.196.84.93]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7NDwNT12811 for ; Sat, 23 Aug 2003 15:58:24 +0200 (MET DST) Received: from dsf by dsf with local (Exim 3.36 #1 (Debian)) id 19qYuM-0005kn-00 for ; Sat, 23 Aug 2003 06:58:22 -0700 To: caml-list@pauillac.inria.fr Subject: [Caml-list] Unix.chdir and backtrace From: david.fox@lindows.com Message-Id: Date: Sat, 23 Aug 2003 06:58:22 -0700 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; backtrace:01 lindows:01 backtrace:01 argv:01 pathname:01 foo:01 strace:01 foo:01 unix:02 unix:02 failing:02 let:04 fox:04 output:05 uses:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. Not a big deal, but maybe I can save someone the half hour I spent tracking this down. ------------------- 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