mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-03 15:15:17 +02:00
Redirect IO to /dev/null on each reset
This commit is contained in:
parent
c0e9ec540e
commit
7c53a45dda
1 changed files with 6 additions and 6 deletions
|
@ -581,6 +581,12 @@ static void runRMXPScripts(BacktraceData &btData)
|
|||
|
||||
while (true)
|
||||
{
|
||||
#if defined(OLD_RUBY) && defined(NO_CONSOLE)
|
||||
VALUE iostr = rb_str_new2(NULL_IO);
|
||||
// Sysinit isn't a thing yet, so send io to /dev/null instead
|
||||
rb_funcall(rb_gv_get("$stderr"), rb_intern("reopen"), 1, iostr);
|
||||
rb_funcall(rb_gv_get("$stdout"), rb_intern("reopen"), 1, iostr);
|
||||
#endif
|
||||
for (long i = 0; i < scriptCount; ++i)
|
||||
{
|
||||
VALUE script = rb_ary_entry(scriptArray, i);
|
||||
|
@ -714,12 +720,6 @@ static void mriBindingExecute()
|
|||
#else
|
||||
ruby_init();
|
||||
rb_eval_string("$KCODE='U'");
|
||||
#ifdef NO_CONSOLE
|
||||
VALUE iostr = rb_str_new2(NULL_IO);
|
||||
// Sysinit isn't a thing yet, so send io to /dev/null instead
|
||||
rb_funcall(rb_gv_get("$stderr"), rb_intern("reopen"), 1, iostr);
|
||||
rb_funcall(rb_gv_get("$stdout"), rb_intern("reopen"), 1, iostr);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_FAKEAPI) && !defined(__WIN32__)
|
||||
|
|
Loading…
Add table
Reference in a new issue