Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2016 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d03d4f6ccf624a10bd8617df7243bc64 to your computer and use it in GitHub Desktop.
Save anonymous/d03d4f6ccf624a10bd8617df7243bc64 to your computer and use it in GitHub Desktop.
uv_process_options_t options = {0};
options.args = const_cast<char**>(args_raw.get());
options.file = args_[0].c_str();
options.exit_cb = OnExit;
options.stdio_count = 3;
uv_stdio_container_t child_stdio[3];
memset(&child_stdio, 0, sizeof(child_stdio));
child_stdio[0].flags = UV_IGNORE;
child_stdio[1].flags = static_cast<uv_stdio_flags>(UV_CREATE_PIPE | UV_READABLE_PIPE);
child_stdio[1].data.stream = (uv_stream_t *) &stdout_pipe_;
child_stdio[2].flags = UV_IGNORE;
options.stdio = child_stdio;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment