getting the path to the executing program

Tomasz Zielonka t.zielonka at
Thu Jan 8 19:14:31 EST 2004

On Thu, Jan 08, 2004 at 07:02:04PM +0100, Tomasz Zielonka wrote:
> On Thu, Jan 08, 2004 at 09:06:44AM -0800, Hal Daume III wrote:
> > is there a function, related to getProgName, which returns the (absolute) 
> > path to the current program?
> A non-portable Linux solution:
>     System.Posix.readSymbolicLink "/proc/self/exe"

A non-portable FreeBSD solution:

    System.Posix.readSymbolicLink "/proc/curproc/file"

Best regards,

.signature: Too many levels of symbolic links

More information about the Haskell mailing list