@@ -368,7 +368,7 @@ setup_debug_log_filter(void)
368368
369369 if (len >= MAX_DEBUG_LOG_FILTER_LEN ) {
370370 fprintf (stderr , "too long: %s (max:%d)\n" , str , MAX_DEBUG_LOG_FILTER_LEN - 1 );
371- exit (1 );
371+ exit (EXIT_FAILURE );
372372 }
373373
374374 // body
@@ -396,7 +396,7 @@ setup_debug_log(void)
396396 debug_log .mem = (char * )malloc (MAX_DEBUG_LOG * MAX_DEBUG_LOG_MESSAGE_LEN );
397397 if (debug_log .mem == NULL ) {
398398 fprintf (stderr , "setup_debug_log failed (can't allocate memory)\n" );
399- exit (1 );
399+ exit (EXIT_FAILURE );
400400 }
401401 ruby_debug_log_mode |= ruby_debug_log_memory ;
402402 }
@@ -424,7 +424,7 @@ setup_debug_log(void)
424424 break ;
425425 default :
426426 fprintf (stderr , "can not parse RUBY_DEBUG_LOG filename: %s\n" , log_config );
427- exit (1 );
427+ exit (EXIT_FAILURE );
428428 }
429429 }
430430 else {
@@ -433,13 +433,13 @@ setup_debug_log(void)
433433
434434 if (j >= DEBUG_LOG_MAX_PATH ) {
435435 fprintf (stderr , "RUBY_DEBUG_LOG=%s is too long\n" , log_config );
436- exit (1 );
436+ exit (EXIT_FAILURE );
437437 }
438438 }
439439
440440 if ((debug_log .output = fopen (debug_log .output_file , "w" )) == NULL ) {
441441 fprintf (stderr , "can not open %s for RUBY_DEBUG_LOG\n" , log_config );
442- exit (1 );
442+ exit (EXIT_FAILURE );
443443 }
444444 setvbuf (debug_log .output , NULL , _IONBF , 0 );
445445 }
0 commit comments