diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-20 04:04:51 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-20 04:04:51 +0000 |
| commit | eb31d95c8d0d8bf8f15538a44fddb3f5317fe66b (patch) | |
| tree | a4f383869a422c5a5e6d44048b0293157f38ff14 /io.c | |
| parent | e6025fe36afa3280c631382f2bfadf6e4e3a9e06 (diff) | |
| download | ruby-eb31d95c8d0d8bf8f15538a44fddb3f5317fe66b.tar.gz ruby-eb31d95c8d0d8bf8f15538a44fddb3f5317fe66b.tar.xz ruby-eb31d95c8d0d8bf8f15538a44fddb3f5317fe66b.zip | |
* include/ruby/win32.h win32/win32.c (rb_w32_pipe_exec): use dual fd
instead of socketpair when mode is RDWR.
* io.c (pipe_open): pass &write_fd to rb_w32_pipe_exec().
* io.c (popen_redirect): define only when HAVE_FORK.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3138,6 +3138,7 @@ rb_io_unbuffered(rb_io_t *fptr) rb_io_synchronized(fptr); } +#ifdef HAVE_FORK struct popen_arg { struct rb_exec_arg exec; int modef; @@ -3176,7 +3177,6 @@ popen_redirect(struct popen_arg *p) } } -#ifdef HAVE_FORK static int popen_exec(void *pp) { @@ -3299,7 +3299,7 @@ pipe_open(const char *cmd, int argc, VALUE *argv, const char *mode) exename = cmd; cmd = rb_w32_join_argv(ALLOCA_N(char, rb_w32_argv_size(args)), args); } - while ((pid = rb_w32_pipe_exec(cmd, exename, openmode, &fd)) == -1) { + while ((pid = rb_w32_pipe_exec(cmd, exename, openmode, &fd, &write_fd)) == -1) { /* exec failed */ switch (errno) { case EAGAIN: |
