From 32ef17fe7b69417d0c1d54b94105e3603fafe832 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 13 Jun 2008 05:24:40 +0000 Subject: [PATCH] * gc.c (rb_memerror): exit with EXIT_FAILURE instead of magic number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 +++- gc.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcbb582984..aea34c3d61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -Fri Jun 13 14:18:54 2008 Nobuyoshi Nakada +Fri Jun 13 14:24:37 2008 Nobuyoshi Nakada + + * gc.c (rb_memerror): exit with EXIT_FAILURE instead of magic number. * gc.c (ruby_stack_check): STACK_LENGTH should be less than STACK_LEVEL_MAX. diff --git a/gc.c b/gc.c index 567dca1cf8..5a19ed7093 100644 --- a/gc.c +++ b/gc.c @@ -273,7 +273,7 @@ rb_memerror(void) if (!nomem_error || (rb_thread_raised_p(th, RAISED_NOMEMORY) && rb_safe_level() < 4)) { fprintf(stderr, "[FATAL] failed to allocate memory\n"); - exit(1); + exit(EXIT_FAILURE); } rb_thread_raised_set(th, RAISED_NOMEMORY); rb_exc_raise(nomem_error);