diff options
| author | Martin Ridgers <[email protected]> | 2021-10-29 15:44:43 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-10-29 15:49:27 +0200 |
| commit | db98761c0a8f4d6d812657447d4e3c9130bc0de4 (patch) | |
| tree | be3f9b1b71735bb4bbb1f989f7432156dd22ba9b /zenserver/compute/apply.cpp | |
| parent | Use THIRDPARTY_START/END instead of MSVC pragmas (diff) | |
| download | zen-db98761c0a8f4d6d812657447d4e3c9130bc0de4.tar.xz zen-db98761c0a8f4d6d812657447d4e3c9130bc0de4.zip | |
If-def'd out Basic/SandboxedFuncJob classes and CreateProcess() calls
Diffstat (limited to 'zenserver/compute/apply.cpp')
| -rw-r--r-- | zenserver/compute/apply.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp index 059cd152d..1d5de8d27 100644 --- a/zenserver/compute/apply.cpp +++ b/zenserver/compute/apply.cpp @@ -34,6 +34,7 @@ using namespace std::literals; namespace zen { +#if ZEN_PLATFORM_WINDOWS struct BasicFunctionJob { public: @@ -133,7 +134,11 @@ BasicFunctionJob::ExitCode() return gsl::narrow_cast<int>(Ec); } +#endif +//////////////////////////////////////////////////////////////////////////////// + +#if ZEN_PLATFORM_WINDOWS struct SandboxedFunctionJob { SandboxedFunctionJob() = default; @@ -323,6 +328,9 @@ SandboxedFunctionJob::SpawnJob(std::filesystem::path ExePath) return true; } +#endif + +//////////////////////////////////////////////////////////////////////////////// HttpFunctionService::HttpFunctionService(CasStore& Store, CidStore& InCidStore, const std::filesystem::path& BaseDir) : m_Log(logging::Get("apply")) @@ -743,6 +751,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) std::string_view ExecPath = Desc["path"].AsString(); std::filesystem::path ExePath = SandboxPath / ExecPath; +#if ZEN_PLATFORM_WINDOWS WideStringBuilder<512> CommandLine; CommandLine.Append(L'"'); CommandLine.Append(ExePath.c_str()); @@ -789,6 +798,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) GetExitCodeProcess(ProcessInformation.hProcess, &ExitCode); // Gather outputs +#endif // ZEN_PLATFORM_WINDOWS FileContents OutputData = zen::ReadFile(SandboxPath / "build.output"); |