Commit 9461da4a authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #157 from mattn/no_close_stdin

don't close stdin.
parents 631ab353 751d391a
...@@ -124,7 +124,7 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args) ...@@ -124,7 +124,7 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
static void static void
cleanup(mrb_state *mrb, struct _args *args) cleanup(mrb_state *mrb, struct _args *args)
{ {
if (args->rfp) if (args->rfp && args->rfp != stdin)
fclose(args->rfp); fclose(args->rfp);
if (args->cmdline) if (args->cmdline)
mrb_free(mrb, args->cmdline); mrb_free(mrb, args->cmdline);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment