From fae88b329c63c16755f2c9b7a5a655a1414ab10f Mon Sep 17 00:00:00 2001 From: simonb Date: Tue, 25 Apr 2006 02:11:19 +0000 Subject: Output the error message on fallback restart execs (sf.net patch #1475213). Thanks Jonas Koelker, jonaskoelker at users.sourceforge.net. --- ChangeLog | 4 ++++ src/main.cc | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3bad7b4..24faf6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.16: +*06/04/25: + * Output the error message on fallback restart execs (sf patch#1475213) + (Thanks Jonas Kölker, jonaskoelker at users.sourceforge.net). + main.cc *06/04/24: * Use -Wall when --enable-debug and some warning fixes (Simon + thanks Jonas Koelker) diff --git a/src/main.cc b/src/main.cc index b458fbf..00bc163 100644 --- a/src/main.cc +++ b/src/main.cc @@ -312,7 +312,11 @@ int main(int argc, char **argv) { // fall back in case the above execlp doesn't work execvp(argv[0], argv); - execvp(FbTk::StringUtil::basename(argv[0]).c_str(), argv); + perror(argv[0]); + + const char *basename = FbTk::StringUtil::basename(argv[0]).c_str(); + execvp(basename, argv); + perror(basename); } return exitcode; -- cgit v0.11.2