From 20645ae11a8a9a89cc712896b2f72a25bc62c8db Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 11 Jan 2010 12:12:53 +0100 Subject: 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 Signed-off-by: Denys Vlasenko --- lib/Utils/spawn.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/Utils/spawn.cpp') 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]); -- cgit