Merge pull request #157 from mattn/no_close_stdin

don't close stdin.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2012-05-18 00:34:57 -07:00
+1 -1
View File
@@ -124,7 +124,7 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
static void
cleanup(mrb_state *mrb, struct _args *args)
{
if (args->rfp)
if (args->rfp && args->rfp != stdin)
fclose(args->rfp);
if (args->cmdline)
mrb_free(mrb, args->cmdline);