Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
test: fix EPIPE race in spawn_closed_process_io
Browse files Browse the repository at this point in the history
The just created stdin should not be closed by a child process before
writing to it, otherwise EPIPE happens.
  • Loading branch information
indutny committed Apr 10, 2014
1 parent 86831fe commit a0af611
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-spawn.c
Expand Up @@ -690,9 +690,9 @@ TEST_IMPL(spawn_closed_process_io) {
uv_write_t write_req;
uv_buf_t buf;
uv_stdio_container_t stdio[2];
static char buffer[] = "hello-from-spawn_stdin";
static char buffer[] = "hello-from-spawn_stdin\n";

init_process_options("spawn_helper1", exit_cb);
init_process_options("spawn_helper3", exit_cb);

uv_pipe_init(uv_default_loop(), &in, 0);
options.stdio = stdio;
Expand Down

0 comments on commit a0af611

Please sign in to comment.