chiark / gitweb /
execute: improve exec_spawn() logging
authorLennart Poettering <lennart@poettering.net>
Sat, 10 Apr 2010 15:46:01 +0000 (17:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 10 Apr 2010 16:00:34 +0000 (18:00 +0200)
execute.c

index e4a70cd09a7a7d085eaf4ca3d4bd4f558d2e80e7..46a9832081aae1427222039011641fa40dc4f904 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -457,13 +457,18 @@ int exec_spawn(ExecCommand *command,
 
         pid_t pid;
         int r;
 
         pid_t pid;
         int r;
+        char *line;
 
         assert(command);
         assert(context);
         assert(ret);
         assert(fds || n_fds <= 0);
 
 
         assert(command);
         assert(context);
         assert(ret);
         assert(fds || n_fds <= 0);
 
-        log_debug("About to execute %s", command->path);
+        if (!(line = exec_command_line(command)))
+                return -ENOMEM;
+
+        log_debug("About to execute: %s", line);
+        free(line);
 
         if (cgroup_bondings)
                 if ((r = cgroup_bonding_realize_list(cgroup_bondings)))
 
         if (cgroup_bondings)
                 if ((r = cgroup_bonding_realize_list(cgroup_bondings)))