summaryrefslogtreecommitdiffstats
path: root/lib/Utils/spawn.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-11 12:12:53 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-11 12:12:53 +0100
commit20645ae11a8a9a89cc712896b2f72a25bc62c8db (patch)
treed690f80802f03d1895c5dc3a7a04c7ceef0d1518 /lib/Utils/spawn.cpp
parentedf6beb585dc38c365ccbdaae85756b2814e1329 (diff)
downloadabrt-20645ae11a8a9a89cc712896b2f72a25bc62c8db.tar.gz
abrt-20645ae11a8a9a89cc712896b2f72a25bc62c8db.tar.xz
abrt-20645ae11a8a9a89cc712896b2f72a25bc62c8db.zip
DebugDump: more consistent logic in setting mode and uid:gid on dump dir
With comments! yay. Before it, too restrictive mode was preventing python craches to be handled. Signed-off-by: Karel Klic <kklic@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils/spawn.cpp')
-rw-r--r--lib/Utils/spawn.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Utils/spawn.cpp b/lib/Utils/spawn.cpp
index 3aeb682..d3e6ac6 100644
--- a/lib/Utils/spawn.cpp
+++ b/lib/Utils/spawn.cpp
@@ -5,6 +5,19 @@
*/
#include "abrtlib.h"
+using namespace std;
+
+static string concat_str_vector(char **strings)
+{
+ string result;
+ while (*strings) {
+ result += *strings++;
+ if (*strings)
+ result += ' ';
+ }
+ return result;
+}
+
/* Returns pid */
pid_t fork_execv_on_steroids(int flags,
char **argv,
@@ -71,6 +84,7 @@ pid_t fork_execv_on_steroids(int flags,
if (dir)
xchdir(dir);
+ VERB1 log("Executing: %s", concat_str_vector(argv).c_str());
execvp(argv[0], argv);
if (!(flags & EXECFLG_QUIET))
perror_msg("Can't execute '%s'", argv[0]);