[systemd-commits] src/core

Harald Hoyer harald at kemper.freedesktop.org
Wed Apr 17 00:56:13 PDT 2013


 src/core/execute.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 03bb799e0b3560dca8c9b70de3dbadb0c281b36f
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Apr 10 11:29:03 2013 +0200

    core/execute.c: debug log final execve() with argv[]
    
    https://bugzilla.redhat.com/show_bug.cgi?id=772073

diff --git a/src/core/execute.c b/src/core/execute.c
index 5083af9..ab508b1 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;



More information about the systemd-commits mailing list