From 6d0158fe19b7fb0134ae6d0735dce59094772672 Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 1 Aug 2002 01:41:41 +0000 Subject: [PATCH] show some more info on execvp error git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4820 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 4 ++++ src/support/forkedcall.C | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 99c99fa0eb..49675f7435 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2002-08-01 John Levon + + * forkedcall.C: more details on error + 2002-07-29 Lars Gullik Bjønnes * lstrings.[hC]: rename stip to rtrim and frontStrip to ltrim, diff --git a/src/support/forkedcall.C b/src/support/forkedcall.C index 912b13e855..6ba3bf3f10 100644 --- a/src/support/forkedcall.C +++ b/src/support/forkedcall.C @@ -254,8 +254,12 @@ pid_t Forkedcall::generateChild() pid_t cpid = ::fork(); if (cpid == 0) { // child execvp(syscmd, argv); - // If something goes wrong, we end up here: - lyxerr << "execvp failed: " + // If something goes wrong, we end up here + string args; + int i = 0; + while (argv[i] != 0) + args += string(" ") + argv[i++]; + lyxerr << "execvp of \"" << syscmd << args << "\" failed: " << strerror(errno) << endl; } #else