Browse Source

process_wrap: set duplex flags when creating a pipe

v0.9.1-release
Bert Belder 13 years ago
committed by isaacs
parent
commit
5432a1d985
  1. 3
      src/process_wrap.cc

3
src/process_wrap.cc

@ -106,7 +106,8 @@ class ProcessWrap : public HandleWrap {
if (type->Equals(String::NewSymbol("ignore"))) { if (type->Equals(String::NewSymbol("ignore"))) {
options->stdio[i].flags = UV_IGNORE; options->stdio[i].flags = UV_IGNORE;
} else if (type->Equals(String::NewSymbol("pipe"))) { } else if (type->Equals(String::NewSymbol("pipe"))) {
options->stdio[i].flags = UV_CREATE_PIPE; options->stdio[i].flags = static_cast<uv_stdio_flags>(
UV_CREATE_PIPE | UV_READABLE_PIPE | UV_WRITABLE_PIPE);
options->stdio[i].data.stream = reinterpret_cast<uv_stream_t*>( options->stdio[i].data.stream = reinterpret_cast<uv_stream_t*>(
PipeWrap::Unwrap(stdio PipeWrap::Unwrap(stdio
->Get(String::NewSymbol("handle")).As<Object>())->UVHandle()); ->Get(String::NewSymbol("handle")).As<Object>())->UVHandle());

Loading…
Cancel
Save