aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gprofng/src/gp-display-text.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gprofng/src/gp-display-text.cc b/gprofng/src/gp-display-text.cc
index 0d0a5e7..85ae274 100644
--- a/gprofng/src/gp-display-text.cc
+++ b/gprofng/src/gp-display-text.cc
@@ -20,6 +20,7 @@
#include "config.h"
#include <unistd.h> // isatty
+#include <errno.h>
#include "gp-print.h"
#include "ipcio.h"
@@ -55,7 +56,11 @@ reexec ()
{
if (dbeSession != NULL)
dbeSession->unlink_tmp_files ();
- execv (exe_name, new_argv);
+ execvp (exe_name, new_argv);
+ fprintf (stderr, GTXT ("Error: reexec() failed (%d: %s)\n"), errno,
+ STR(strerror (errno)));
+ fflush (stderr);
+ exit (1);
}
/**