Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
squash! shut up linter
  • Loading branch information
bnoordhuis authored and aduh95 committed May 11, 2024
commit 65aab5eac28b2f70f4169f37cb8f2b8daa1d8ec1
17 changes: 3 additions & 14 deletions src/spawn_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ void SyncProcessOutputBuffer::set_next(SyncProcessOutputBuffer* next) {
next_ = next;
}


SyncProcessStdioPipe::SyncProcessStdioPipe(SyncProcessRunner* process_handler,
bool readable,
bool writable,
Expand All @@ -115,7 +114,6 @@ SyncProcessStdioPipe::SyncProcessStdioPipe(SyncProcessRunner* process_handler,
CHECK(readable || writable);
}


SyncProcessStdioPipe::~SyncProcessStdioPipe() {
CHECK(lifecycle_ == kUninitialized || lifecycle_ == kClosed);

Expand Down Expand Up @@ -204,12 +202,10 @@ bool SyncProcessStdioPipe::writable() const {
return writable_;
}


bool SyncProcessStdioPipe::overlapped() const {
return overlapped_;
}


uv_stdio_flags SyncProcessStdioPipe::uv_flags() const {
unsigned int flags;

Expand All @@ -218,8 +214,7 @@ uv_stdio_flags SyncProcessStdioPipe::uv_flags() const {
flags |= UV_READABLE_PIPE;
if (writable())
flags |= UV_WRITABLE_PIPE;
if (overlapped())
flags |= UV_OVERLAPPED_PIPE;
if (overlapped()) flags |= UV_OVERLAPPED_PIPE;

return static_cast<uv_stdio_flags>(flags);
}
Expand Down Expand Up @@ -970,7 +965,6 @@ int SyncProcessRunner::AddStdioIgnore(uint32_t child_fd) {
return 0;
}


int SyncProcessRunner::AddStdioPipe(uint32_t child_fd,
bool readable,
bool writable,
Expand All @@ -979,12 +973,8 @@ int SyncProcessRunner::AddStdioPipe(uint32_t child_fd,
CHECK_LT(child_fd, stdio_count_);
CHECK(!stdio_pipes_[child_fd]);

std::unique_ptr<SyncProcessStdioPipe> h(
new SyncProcessStdioPipe(this,
readable,
writable,
overlapped,
input_buffer));
std::unique_ptr<SyncProcessStdioPipe> h(new SyncProcessStdioPipe(
this, readable, writable, overlapped, input_buffer));

int r = h->Initialize(uv_loop_);
if (r < 0) {
Expand All @@ -1000,7 +990,6 @@ int SyncProcessRunner::AddStdioPipe(uint32_t child_fd,
return 0;
}


int SyncProcessRunner::AddStdioInheritFD(uint32_t child_fd, int inherit_fd) {
CHECK_LT(child_fd, stdio_count_);
CHECK(!stdio_pipes_[child_fd]);
Expand Down