diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-02 16:26:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-02 16:26:04 +0000 |
commit | 205f310c2963edec5fabebdce6aaae076d8af5fb (patch) | |
tree | 976bf46e69ecae65480e30ccb403a60ae0ef9564 /signal.c | |
parent | d08112a656c4715d509f2b2ac7e1e2199068eed6 (diff) | |
download | ruby-205f310c2963edec5fabebdce6aaae076d8af5fb.tar.gz |
* call_cfunc.ci, compile.c, compile.h, debug.h, eval.c,
eval_error.h, eval_jump.h, eval_load.c, eval_thread.c, gc.c,
insnhelper.h, insns.def, iseq.c, main.c, numeric.c, parse.y,
range.c, regenc.h, ruby.h, signal.c, thread.c, thread_win32.ci,
vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h:
fixed indents and non-C90 comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -307,7 +307,7 @@ int rb_prohibit_interrupt = 1; VALUE rb_get_trap_cmd(int sig) { - return trap_list[sig].cmd; + return trap_list[sig].cmd; } void @@ -498,41 +498,41 @@ rb_trap_exit(void) void rb_signal_exec(yarv_thread_t *th, int sig) { - VALUE cmd = rb_get_trap_cmd(sig); + VALUE cmd = rb_get_trap_cmd(sig); - if (cmd == 0) { - switch (sig) { - case SIGINT: - rb_interrupt(); - break; + if (cmd == 0) { + switch (sig) { + case SIGINT: + rb_interrupt(); + break; #ifdef SIGHUP - case SIGHUP: + case SIGHUP: #endif #ifdef SIGQUIT - case SIGQUIT: + case SIGQUIT: #endif #ifdef SIGALRM - case SIGALRM: + case SIGALRM: #endif #ifdef SIGUSR1 - case SIGUSR1: + case SIGUSR1: #endif #ifdef SIGUSR2 - case SIGUSR2: + case SIGUSR2: #endif - rb_thread_signal_raise(th, signo2signm(sig)); - break; + rb_thread_signal_raise(th, signo2signm(sig)); + break; + } + } + else if (cmd == Qundef) { + rb_thread_signal_exit(th); + } + else { + yarv_proc_t *proc; + VALUE signum = INT2FIX(sig); + GetProcPtr(cmd, proc); + th_invoke_proc(th, proc, proc->block.self, 1, &signum); } - } - else if (cmd == Qundef) { - rb_thread_signal_exit(th); - } - else { - yarv_proc_t *proc; - VALUE signum = INT2FIX(sig); - GetProcPtr(cmd, proc); - th_invoke_proc(th, proc, proc->block.self, 1, &signum); - } } void @@ -544,7 +544,7 @@ rb_trap_exec(void) for (i=0; i<NSIG; i++) { if (trap_pending_list[i]) { trap_pending_list[i] = 0; - rb_signal_exec(GET_THREAD(), i); + rb_signal_exec(GET_THREAD(), i); } } #endif /* MACOS_UNUSE_SIGNAL */ |