diff options
-rw-r--r-- | gdb/compile/compile.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 1d18bd7..ccac49d 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -37,6 +37,7 @@ #include "filestuff.h" #include "target.h" #include "osabi.h" +#include "gdb_wait.h" @@ -169,10 +170,14 @@ do_rmdir (void *arg) { const char *dir = arg; char *zap; - + int wstat; + gdb_assert (strncmp (dir, TMP_PREFIX, strlen (TMP_PREFIX)) == 0); zap = concat ("rm -rf ", dir, (char *) NULL); - system (zap); + wstat = system (zap); + if (wstat == -1 || !WIFEXITED (wstat) || WEXITSTATUS (wstat) != 0) + warning (_("Could not remove temporary directory %s"), dir); + XDELETEVEC (zap); } /* Return the name of the temporary directory to use for .o files, and |