* io.c (pipe_open): avoid conflict of variable name. [ruby-dev:24662]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-11-01 02:55:29 +00:00
parent d84edcfd73
commit aa23bfaf08
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
Mon Nov 1 11:52:18 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* io.c (pipe_open): avoid conflict of variable name. [ruby-dev:24662]
Mon Nov 1 11:46:19 2004 WATANABE Hirofumi <eban@ruby-lang.org>
* process.c (rb_f_exec): should check whether prog is NULL.

6
io.c
View File

@ -2783,7 +2783,7 @@ pipe_open(argc, argv, pname, mode)
#elif defined(_WIN32)
FILE *fpr, *fpw;
int openmode = rb_io_mode_modenum(mode);
char *prog = NULL;
char *exename = NULL;
#endif
char *cmd;
@ -2854,9 +2854,9 @@ pipe_open(argc, argv, pname, mode)
cmd = ALLOCA_N(char, rb_w32_argv_size(args));
rb_w32_join_argv(cmd, args);
free(args);
prog = pname;
exename = pname;
}
while ((pid = rb_w32_pipe_exec(cmd, prog, openmode, &fpr, &fpw)) == -1) {
while ((pid = rb_w32_pipe_exec(cmd, exename, openmode, &fpr, &fpw)) == -1) {
/* exec failed */
switch (errno) {
case EAGAIN: