1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "cru/common/platform/unix/PosixSpawnSubProcess.h"
#include "cru/common/SubProcess.h"
#include <spawn.h>
#include <memory>
namespace cru::platform::unix {
PosixSpawnSubProcess::PosixSpawnSubProcess(
const PlatformSubProcessStartInfo& start_info)
: PlatformSubProcessBase(start_info),
pid_(0),
exit_code_(0),
stdin_pipe_(UnixPipe::Usage::Send),
stdout_pipe_(UnixPipe::Usage::Receive),
stderr_pipe_(UnixPipe::Usage::Receive) {
stdin_stream_ = std::make_unique<UnixFileStream>(
stdin_pipe_.GetSelfFileDescriptor(), false, false, true, false);
stdout_stream_ = std::make_unique<UnixFileStream>(
stdout_pipe_.GetSelfFileDescriptor(), false, true, false, false);
stderr_stream_ = std::make_unique<UnixFileStream>(
stderr_pipe_.GetSelfFileDescriptor(), false, true, false, false);
}
PosixSpawnSubProcess::~PosixSpawnSubProcess() {}
void PosixSpawnSubProcess::PlatformCreateProcess() {
}
PlatformSubProcessExitResult PosixSpawnSubProcess::PlatformWaitForProcess() {}
void PosixSpawnSubProcess::PlatformKillProcess() {}
} // namespace cru::platform::unix
|