From c38e97ee4deee7480ab60dc540f374cb472e02d8 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 11 Apr 2014 03:42:06 +0400 Subject: [PATCH] test: fix EPIPE race in spawn_closed_process_io The just created stdin should not be closed by a child process before writing to it, otherwise EPIPE happens. --- test/test-spawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-spawn.c b/test/test-spawn.c index 3afe0cbc..43da6664 100644 --- a/test/test-spawn.c +++ b/test/test-spawn.c @@ -681,9 +681,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;