# HG changeset patch # User John W. Eaton # Date 1383106708 14400 # Node ID 0b81d65d3c49315f0e37a8e808d1ed36f28d01fc # Parent 56d09eba7c3b81275a0fa8401b44a5f31cfa1737 only fork and exec when starting gui * main.in.cc (main): Reverse sense of test. Switch test to check gui_libs instead of cli_only. diff -r 56d09eba7c3b -r 0b81d65d3c49 src/main.in.cc --- a/src/main.in.cc Tue Oct 29 20:39:15 2013 -0700 +++ b/src/main.in.cc Wed Oct 30 00:18:28 2013 -0400 @@ -398,7 +398,7 @@ #if defined (HAVE_OCTAVE_GUI) bool start_gui = true; - bool cli_only = false; + bool gui_libs = true; #endif std::string octave_bindir = get_octave_bindir (); @@ -427,7 +427,7 @@ // on as that option is not recognized by Octave. #if defined (HAVE_OCTAVE_GUI) - cli_only = true; + gui_libs = false; #endif file = octave_bindir + dir_sep_char + "octave-cli"; } @@ -456,11 +456,7 @@ #else - if (cli_only || (! start_gui && ! have_controlling_terminal ())) - { - retval = octave_exec (file, new_argv); - } - else + if (gui_libs && start_gui && have_controlling_terminal ()) { install_signal_handlers (); @@ -505,6 +501,8 @@ } } } + else + retval = octave_exec (file, new_argv); #endif