aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-20 04:04:51 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-20 04:04:51 +0000
commitcae4fb76dcc6810a38ad67301fb764b8b7e5c5ca (patch)
treea4f383869a422c5a5e6d44048b0293157f38ff14 /io.c
parent0d8ac93f58782d694f30daf7dbf2735b3ecb434c (diff)
downloadruby-cae4fb76dcc6810a38ad67301fb764b8b7e5c5ca.tar.gz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 4ba19005be..369f0b0e59 100644
--- a/io.c
+++ b/io.c
@@ -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: