4#ifndef _Stroika_Foundation_Execution_Module_h_
5#define _Stroika_Foundation_Execution_Module_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
15#if qStroika_Platform_POSIX
19#include "Stroika/Foundation/Characters/SDKString.h"
20#include "Stroika/Foundation/Common/Common.h"
21#include "Stroika/Foundation/Common/Property.h"
22#include "Stroika/Foundation/Containers/Mapping.h"
23#include "Stroika/Foundation/Containers/Sequence.h"
24#include "Stroika/Foundation/Execution/LazyInitialized.h"
28#if qStroika_Platform_POSIX
29 using pid_t = ::pid_t;
30#elif qStroika_Platform_Windows
72 extern const LazyInitialized<Containers::Sequence<filesystem::path>>
kPath;
74#if qStroika_Platform_Windows
80 extern const LazyInitialized<Containers::Sequence<filesystem::path>> kPathEXT;
88 extern const LazyInitialized<Containers::Mapping<Characters::SDKString, Characters::SDKString>>
kRawEnvironment;
95 extern const LazyInitialized<Containers::Mapping<Characters::String, Characters::String>>
kEnvironment;
optional< bool > IsAddressReadOnlyAppLifetime(span< const byte > s)
Is all of s in memory that is read-only for as long as the program runs - so a pointer into it may be...
const LazyInitialized< Containers::Mapping< Characters::String, Characters::String > > kEnvironment
convert getenv() to a Mapping of Strings for easier access
const LazyInitialized< Containers::Sequence< filesystem::path > > kPath
const LazyInitialized< Containers::Mapping< Characters::SDKString, Characters::SDKString > > kRawEnvironment
convert getenv() to a Mapping of SDKString (in case some issue with charactor set conversion)
filesystem::path GetEXEDir()
optional< filesystem::path > FindExecutableInPath(const filesystem::path &fn)
If fn refers to an executable - return it (using kPATH, and kPathEXT as appropriate)
filesystem::path GetEXEPath()