[Issue 11149] Runtime.args no longer available in static constructors.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 23 08:26:30 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #16 from Jacob Carlborg <doob at me.com> 2013-10-23 08:26:27 PDT ---
(In reply to comment #15)

> Thanks for the idea Jacob. It would solve the regression but it's not portable.
> So once we port the shared library bits to FreeBSD/OSX it will break on those
> platforms.
> 
> NB: Shared libraries were the reason to move the init/fini calls.

None of this low level stuff is portable.

FreeBSD: using sysctl with KERN_PROC_ARGS looks like it would to the trick.
See:

http://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=3&apropos=0&manpath=FreeBSD+9.2-RELEASE

https://github.com/D-Programming-Language/phobos/blob/master/std/file.d#L1650

Mac OS X: _NSGetArgv and _NSGetArgc. See /usr/include/crt_externs.h.

Windows (if needed): GetCommandLine. See:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms683156.aspx

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list