changeset 28601:7bc89d11ec13 stable

__debug_octave__.m: Use slight more generic terminal on Linux. * __debug_octave__.m: Eliminate unused return value from system(). Remove FIXME note about portable terminal on Linux. Use 'x-terminal-emulator' as terminal default on Linux. Execute system() with "async" option so that Octave and gdb can run separately.
author Rik <rik@octave.org>
date Wed, 29 Jul 2020 10:50:07 -0700
parents dce34ad6a6ea
children 79558e694c6c
files scripts/testfun/__debug_octave__.m
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/__debug_octave__.m	Wed Jul 29 11:39:52 2020 -0400
+++ b/scripts/testfun/__debug_octave__.m	Wed Jul 29 10:50:07 2020 -0700
@@ -48,14 +48,12 @@
   endif
 
   if (nargin == 0)
-    [status, ~] = system ("gdb --version");
+    status = system ("gdb --version");
     if (status != 0)
       error ("unable to execute gdb");
     endif
     if (isunix ())
-      ## FIXME: is there a portable way to run a command in a new window?
-      ## Obviously, gnome-terminal is not always available.
-      command_string = "gnome-terminal -- gdb -p %d";
+      command_string = "x-terminal-emulator -e gdb -p %d";
     elseif (ispc ())
       command_string = "start gdb -p %d";
     elseif (ismac ())
@@ -65,7 +63,7 @@
     endif
   endif
 
-  system (sprintf (command_string, getpid ()));
+  system (sprintf (command_string, getpid ()), "async");
 
 endfunction