Browse files

unix: don't swap stdin file descriptors

Bug introduced in 47f496a. It turns out the file descriptors of the
stdin pipe don't have to be swapped around.
  • Loading branch information...
1 parent 2cecd0d commit 6f679a4ff7bd332eb601e11a7d815311e22612c5 @bnoordhuis bnoordhuis committed Jan 11, 2013
Showing with 0 additions and 8 deletions.
  1. +0 −8 src/unix/process.c
View
8 src/unix/process.c
@@ -391,14 +391,6 @@ int uv_spawn(uv_loop_t* loop,
if (uv__process_init_stdio(options.stdio + i, pipes[i]))
goto error;
- /* swap stdin file descriptors, it's the only writable stream */
- {
- int* p = pipes[0];
- int t = p[0];
- p[0] = p[1];
- p[1] = t;
- }
-
/* This pipe is used by the parent to wait until
* the child has called `execve()`. We need this
* to avoid the following race condition:

0 comments on commit 6f679a4

Please sign in to comment.