From 22f714585b943d0b2457c66a78917113072f4503 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 17 May 2018 12:56:18 +0200 Subject: Native access to Genode environment Add a 'GenodeEnv' type and a 'componentConstructHook' to the system module. The 'componentConstructHook' allows for detection of POSIX style programs that exit implicitly or native Genode components that initialize to serve RPC requests and OS signals. This hook takes a 'GenodeEnv' argument so that the environment interface is passed cleanly to application code after globals are initialized. This is an typed pointer to a C++ object, procedures for accessing the environment will be available from a Nimble library and not included in the standard library. The standard library has an internal pointer to the environment object but this is not for external use, the undocumented global environment pointer has been removed. --- lib/pure/os.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure/os.nim') diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 04afb1eff..5008b904c 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1440,7 +1440,7 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1", tags: [ReadIOEffect].} = elif defined(solaris): result = getApplAux("/proc/" & $getpid() & "/path/a.out") elif defined(genode): - raiseOSError("POSIX command line not supported") + raiseOSError(OSErrorCode(-1), "POSIX command line not supported") elif defined(freebsd) or defined(dragonfly): result = getApplFreebsd() # little heuristic that may work on other POSIX-like systems: -- cgit 1.4.1-2-gfad0