diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-10-27 16:13:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-17 11:13:44 +0100 |
commit | befc4a800e9dc212c4f51bb9b20052b25d808590 (patch) | |
tree | e91def6dccf97d1b97026704dcb53edae1d9c8b4 /src | |
parent | 2038c3f58486ea5da1a2fbf2fdb898f9fd6f8cae (diff) | |
download | systemd-befc4a800e9dc212c4f51bb9b20052b25d808590.tar.gz systemd-befc4a800e9dc212c4f51bb9b20052b25d808590.tar.bz2 systemd-befc4a800e9dc212c4f51bb9b20052b25d808590.zip |
core: add exec_context_dump() support for fd: and file: stdio settings
This was missing for using fdnames as stdio, let's add support for
fdnames as well as file paths in one go.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/execute.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 7d6919f02b..fa3be18565 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -4035,6 +4035,20 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) { prefix, exec_output_to_string(c->std_output), prefix, exec_output_to_string(c->std_error)); + if (c->std_input == EXEC_INPUT_NAMED_FD) + fprintf(f, "%sStandardInputFileDescriptorName: %s\n", prefix, c->stdio_fdname[STDIN_FILENO]); + if (c->std_output == EXEC_OUTPUT_NAMED_FD) + fprintf(f, "%sStandardOutputFileDescriptorName: %s\n", prefix, c->stdio_fdname[STDOUT_FILENO]); + if (c->std_error == EXEC_OUTPUT_NAMED_FD) + fprintf(f, "%sStandardErrorFileDescriptorName: %s\n", prefix, c->stdio_fdname[STDERR_FILENO]); + + if (c->std_input == EXEC_INPUT_FILE) + fprintf(f, "%sStandardInputFile: %s\n", prefix, c->stdio_file[STDIN_FILENO]); + if (c->std_output == EXEC_OUTPUT_FILE) + fprintf(f, "%sStandardOutputFile: %s\n", prefix, c->stdio_file[STDOUT_FILENO]); + if (c->std_error == EXEC_OUTPUT_FILE) + fprintf(f, "%sStandardErrorFile: %s\n", prefix, c->stdio_file[STDERR_FILENO]); + if (c->tty_path) fprintf(f, "%sTTYPath: %s\n" |