summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2013-04-10 11:29:03 +0200
committerHarald Hoyer <harald@redhat.com>2013-04-17 09:54:24 +0200
commit03bb799e0b3560dca8c9b70de3dbadb0c281b36f (patch)
treea236cdd7d25cff647de4f019b687ab35111351de /src/core/execute.c
parent432c30d25fc2a7b4939d5ea6c29708e1323a2b9c (diff)
core/execute.c: debug log final execve() with argv[]
https://bugzilla.redhat.com/show_bug.cgi?id=772073
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 5083af9aed..ab508b1618 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1516,6 +1516,20 @@ int exec_spawn(ExecCommand *command,
final_env = strv_env_clean(final_env);
+ if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ line = exec_command_line(final_argv);
+ if (line) {
+ log_open();
+ log_struct_unit(LOG_DEBUG,
+ unit_id,
+ "EXECUTABLE=%s", command->path,
+ "MESSAGE=Executing: %s",
+ line, NULL);
+ log_close();
+ free(line);
+ line = NULL;
+ }
+ }
execve(command->path, final_argv, final_env);
err = -errno;
r = EXIT_EXEC;