[systemd-devel] [PATCH V3] core/execute.c: debug log final execve() with argv[]
Harald Hoyer
harald.hoyer at gmail.com
Wed Apr 10 02:51:35 PDT 2013
Am 10.04.2013 11:49, schrieb harald at redhat.com:
> From: Harald Hoyer <harald at redhat.com>
>
> https://bugzilla.redhat.com/show_bug.cgi?id=772073
> ---
> src/core/execute.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/core/execute.c b/src/core/execute.c
> index 5083af9..c881e56 100644
> --- a/src/core/execute.c
> +++ b/src/core/execute.c
> @@ -1516,6 +1516,16 @@ int exec_spawn(ExecCommand *command,
>
> final_env = strv_env_clean(final_env);
>
> + if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
> + log_open();
> + log_struct_unit(LOG_DEBUG,
> + unit_id,
> + "EXECUTABLE=%s", command->path,
> + "MESSAGE=Executing: %s %s",
> + command->path, strv_join(&final_argv[1], " "),
> + NULL);
> + log_close();
> + }
> execve(command->path, final_argv, final_env);
> err = -errno;
> r = EXIT_EXEC;
>
-ENOCOFFEE... sorry for the spam :-)
More information about the systemd-devel
mailing list