diff libinterp/octave.cc @ 16753:f8f35ddc49a2

exit gracefully after executing code from --eval * octave.cc (octave_execute_interpreter): When handling --eval code, set quitting_gracefully to true before calling clean_up_and_exit.
author John W. Eaton <jwe@octave.org>
date Wed, 12 Jun 2013 09:58:28 -0400
parents 63b144e6a3d0
children 8d188159ce5f
line wrap: on
line diff
--- a/libinterp/octave.cc	Wed Jun 12 20:25:36 2013 +0800
+++ b/libinterp/octave.cc	Wed Jun 12 09:58:28 2013 -0400
@@ -960,7 +960,11 @@
       int parse_status = execute_eval_option_code (code_to_eval);
 
       if (! (persist || remaining_args > 0))
-        clean_up_and_exit (parse_status || error_state ? 1 : 0);
+        {
+          quitting_gracefully = true;
+
+          clean_up_and_exit (parse_status || error_state ? 1 : 0);
+        }
     }
 
   if (remaining_args > 0)