gp-display-gui (https://savannah.gnu.org/projects/gprofng-gui)
can be installed in a different directory.
In this case, $PATH is used to look up gp-display-text.
execv() does not use $PATH to find the executable.
gprofng/ChangeLog
2023-08-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
* src/gp-display-text.cc (reexec): Use execvp instead of execv.
#include "config.h"
#include <unistd.h> // isatty
+#include <errno.h>
#include "gp-print.h"
#include "ipcio.h"
{
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);
}
/**