summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-02 07:36:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-02 07:36:00 +0000
commit825430438debeed9fe7208b69c923594be8b063e (patch)
tree90522a8c2a404b8193245d6cc08265513b4196cd /io.c
parent0b89081bbb4b69c70596107d834031974a857177 (diff)
downloadruby-825430438debeed9fe7208b69c923594be8b063e.tar.gz
* io.c (pipe_open): cmd is no longer used if fork is available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34868 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 5d49f7f9f0..35104c6f4c 100644
--- a/io.c
+++ b/io.c
@@ -5430,14 +5430,14 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode,
FILE *fp = 0;
int fd = -1;
int write_fd = -1;
- const char *cmd = 0;
#if !defined(HAVE_FORK)
+ const char *cmd = 0;
int argc;
VALUE *argv;
-#endif
if (prog)
cmd = StringValueCStr(prog);
+#endif
#if !defined(HAVE_FORK)
if (!eargp) {