www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21113] New: std.file.thisExePath on NetBSD depends upon th


          Issue ID: 21113
           Summary: std.file.thisExePath on NetBSD depends upon th /proc
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: euan+dlang-bugzilla torano.co.uk

The function `std.file.thisExPath` depends upon the process filesystem being
mounted, which isn't the case by default.

However, NetBSD provides a sysctl to get the path name similar to FreeBSD, as
can be sen in this C snippet:

    int mib[4] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };

Documentation can be found at:

It would be nice to alter the code to make use of this sysctl call instead.

Aug 04 2020