* command.c (shell_escape): Report errors correctly (with error
authorJim Kingdon <jkingdon@engr.sgi.com>
Wed, 2 Feb 1994 19:58:31 +0000 (19:58 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Wed, 2 Feb 1994 19:58:31 +0000 (19:58 +0000)
message from strerror).

gdb/ChangeLog
gdb/command.c

index fb0a583d6afb78123fdc9af31e68cb1ef2e20ac4..8753559262820167ede6fa480ee063a30394f352 100644 (file)
@@ -1,3 +1,8 @@
+Wed Feb  2 11:16:45 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * command.c (shell_escape): Report errors correctly (with error
+       message from strerror).
+
 Wed Feb  2 14:35:41 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
        * xcoffread.c (read_xcoff_symtab): Change CSECT_LEN to use
index de8bd2a0b9c29967c0e3b51063b44dd2951d9fd1..c302caca020b997390638d1e01ac1522b068b42b 100644 (file)
@@ -1216,8 +1216,10 @@ shell_escape (arg, from_tty)
       else
        execl (user_shell, p, "-c", arg, 0);
 
-      fprintf_unfiltered (gdb_stderr, "Exec of shell failed\n");
-      exit (0);
+      fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", user_shell,
+                         safe_strerror (errno));
+      gdb_flush (gdb_stderr);
+      _exit (0177);
     }
 
   if (pid != -1)