mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (error_print, rb_longjmp, rb_thread_schedule): flush
error message. [ruby-dev:18582] * eval.c (ruby_cleanup): added. just clean up without exit. [ruby-dev:18582] * eval.c (ruby_exec): added. execute main evaluation tree without exit. [ruby-dev:18582] * intern.h: prototypes; ruby_cleanup, ruby_exec git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
97eafefb4a
commit
088276ac84
3 changed files with 39 additions and 8 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
Wed Oct 30 04:07:33 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* eval.c (error_print, rb_longjmp, rb_thread_schedule): flush
|
||||||
|
error message. [ruby-dev:18582]
|
||||||
|
|
||||||
|
* eval.c (ruby_cleanup): added. just clean up without exit.
|
||||||
|
[ruby-dev:18582]
|
||||||
|
|
||||||
|
* eval.c (ruby_exec): added. execute main evaluation tree without
|
||||||
|
exit. [ruby-dev:18582]
|
||||||
|
|
||||||
|
* intern.h: prototypes; ruby_cleanup, ruby_exec
|
||||||
|
|
||||||
Tue Oct 29 02:00:08 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Tue Oct 29 02:00:08 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* ext/extmk.rb (extmake): use dummy_makefile to create dummy
|
* ext/extmk.rb (extmake): use dummy_makefile to create dummy
|
||||||
|
|
32
eval.c
32
eval.c
|
@ -1044,6 +1044,7 @@ error_print()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
@ -1229,8 +1230,8 @@ ruby_finalize()
|
||||||
POP_TAG();
|
POP_TAG();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
ruby_stop(ex)
|
ruby_cleanup(ex)
|
||||||
int ex;
|
int ex;
|
||||||
{
|
{
|
||||||
int state;
|
int state;
|
||||||
|
@ -1251,18 +1252,15 @@ ruby_stop(ex)
|
||||||
ex = error_handle(ex);
|
ex = error_handle(ex);
|
||||||
POP_TAG();
|
POP_TAG();
|
||||||
ruby_finalize();
|
ruby_finalize();
|
||||||
exit(ex);
|
return ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
ruby_run()
|
ruby_exec()
|
||||||
{
|
{
|
||||||
int state;
|
int state;
|
||||||
static int ex;
|
|
||||||
volatile NODE *tmp;
|
volatile NODE *tmp;
|
||||||
|
|
||||||
if (ruby_nerrs > 0) exit(ruby_nerrs);
|
|
||||||
|
|
||||||
Init_stack((void*)&tmp);
|
Init_stack((void*)&tmp);
|
||||||
PUSH_TAG(PROT_NONE);
|
PUSH_TAG(PROT_NONE);
|
||||||
PUSH_ITER(ITER_NOT);
|
PUSH_ITER(ITER_NOT);
|
||||||
|
@ -1273,7 +1271,23 @@ ruby_run()
|
||||||
}
|
}
|
||||||
POP_ITER();
|
POP_ITER();
|
||||||
POP_TAG();
|
POP_TAG();
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ruby_stop(ex)
|
||||||
|
int ex;
|
||||||
|
{
|
||||||
|
exit(ruby_cleanup(ex));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ruby_run()
|
||||||
|
{
|
||||||
|
int state;
|
||||||
|
static int ex;
|
||||||
|
if (ruby_nerrs > 0) exit(ruby_nerrs);
|
||||||
|
state = ruby_exec();
|
||||||
if (state && !ex) ex = state;
|
if (state && !ex) ex = state;
|
||||||
ruby_stop(ex);
|
ruby_stop(ex);
|
||||||
}
|
}
|
||||||
|
@ -3611,6 +3625,7 @@ rb_longjmp(tag, mesg)
|
||||||
rb_class2name(CLASS_OF(ruby_errinfo)),
|
rb_class2name(CLASS_OF(ruby_errinfo)),
|
||||||
ruby_sourcefile, ruby_sourceline,
|
ruby_sourcefile, ruby_sourceline,
|
||||||
RSTRING(e)->ptr);
|
RSTRING(e)->ptr);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_trap_restore_mask();
|
rb_trap_restore_mask();
|
||||||
|
@ -8120,6 +8135,7 @@ rb_thread_schedule()
|
||||||
th->node->nd_file, nd_line(th->node));
|
th->node->nd_file, nd_line(th->node));
|
||||||
}
|
}
|
||||||
END_FOREACH_FROM(curr, th);
|
END_FOREACH_FROM(curr, th);
|
||||||
|
fflush(stderr);
|
||||||
next = main_thread;
|
next = main_thread;
|
||||||
rb_thread_ready(next);
|
rb_thread_ready(next);
|
||||||
next->status = THREAD_TO_KILL;
|
next->status = THREAD_TO_KILL;
|
||||||
|
|
2
intern.h
2
intern.h
|
@ -173,6 +173,8 @@ void rb_mark_end_proc _((void));
|
||||||
void rb_exec_end_proc _((void));
|
void rb_exec_end_proc _((void));
|
||||||
void ruby_finalize _((void));
|
void ruby_finalize _((void));
|
||||||
void ruby_stop _((int));
|
void ruby_stop _((int));
|
||||||
|
int ruby_cleanup _((int));
|
||||||
|
int ruby_exec _((void));
|
||||||
void rb_gc_mark_threads _((void));
|
void rb_gc_mark_threads _((void));
|
||||||
void rb_thread_start_timer _((void));
|
void rb_thread_start_timer _((void));
|
||||||
void rb_thread_stop_timer _((void));
|
void rb_thread_stop_timer _((void));
|
||||||
|
|
Loading…
Add table
Reference in a new issue