diff --git a/ChangeLog b/ChangeLog index a70f41dc76..16d1d221b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 2 16:35:56 2012 Nobuyoshi Nakada + + * io.c (pipe_open): cmd is no longer used if fork is available. + Thu Mar 1 16:13:18 2012 Nobuyoshi Nakada * internal.h (rb_file_const, rb_file_load_ok): moved functions for 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) {