summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/process.c b/process.c
index f75175defd..6e757338c1 100644
--- a/process.c
+++ b/process.c
@@ -218,23 +218,22 @@ static VALUE rb_cProcessStatus;
VALUE
rb_last_status_get(void)
{
- return GET_VM()->last_status;
+ return GET_THREAD()->last_status;
}
void
rb_last_status_set(int status, rb_pid_t pid)
{
- rb_vm_t *vm = GET_VM();
- vm->last_status = rb_obj_alloc(rb_cProcessStatus);
- rb_iv_set(vm->last_status, "status", INT2FIX(status));
- rb_iv_set(vm->last_status, "pid", PIDT2NUM(pid));
+ rb_thread_t *th = GET_THREAD();
+ th->last_status = rb_obj_alloc(rb_cProcessStatus);
+ rb_iv_set(th->last_status, "status", INT2FIX(status));
+ rb_iv_set(th->last_status, "pid", PIDT2NUM(pid));
}
static void
rb_last_status_clear(void)
{
- rb_vm_t *vm = GET_VM();
- vm->last_status = Qnil;
+ GET_THREAD()->last_status = Qnil;
}
/*