Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Unix.chdir and backtrace
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eric C. Cooper <ecc@c...>
Subject: Re: [Caml-list] Unix.chdir and backtrace
On Sat, Aug 23, 2003 at 06:58:22AM -0700, 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 Archives:
Bug reports: FAQ:
Beginner's list: