Skip to content

Commit

Permalink
fix: fix --fifo-tmp-dir documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thefab committed Jul 27, 2020
1 parent 5372a88 commit 7704b22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .metwork-framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Application Options:
-m, --use-locks use locks to append to main log file (useful if several process writes to the same file)
-O, --stdout stdout file path (NULL string (default) can be used to redirect to /dev/null)
-E, --stderr stderr file path (STDOUT string (default) can be used to redirect to the same file than stdout)
-F, --fifo-tmp-dir directory where to store stdout and stderr (default: content of environment variable TMPDIR if set, /tmp if not)
-F, --fifo-tmp-dir directory where to store tmp FIFO for log_proxy (default: content of environment variable TMPDIR if set, /tmp if not)
```

## How to build?
Expand Down
5 changes: 3 additions & 2 deletions src/log_proxy_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

static gchar *stdout_path = "NULL";
static gchar *stderr_path = "STDOUT";
static gchar *fifo_tmp_dir = NULL;
static gchar *fifo_tmp_dir = NULL;
static gchar *command = NULL;
static gchar **command_args = NULL;
static GOptionEntry new_entry1 = { "stdout", 'O', 0, G_OPTION_ARG_STRING, &stdout_path, "stdout file path (NULL string (default) can be used to redirect to /dev/null)", NULL };
static GOptionEntry new_entry2 = { "stderr", 'E', 0, G_OPTION_ARG_STRING, &stderr_path, "stderr file path (STDOUT string (default) can be used to redirect to the same file than stdout)", NULL };
static GOptionEntry new_entry3 = { "fifo-tmp-dir", 'F', 0, G_OPTION_ARG_STRING, &fifo_tmp_dir, "directory where to store stdout and stderr (default: content of environment variable TMPDIR if set, /tmp if not)", NULL };
static GOptionEntry new_entry3 = { "fifo-tmp-dir", 'F', 0, G_OPTION_ARG_STRING, &fifo_tmp_dir, "directory where to store tmp FIFO for log_proxy (default: content of environment variable TMPDIR if set, /tmp if not)", NULL };

GOptionEntry *change_options()
{
Expand Down Expand Up @@ -112,6 +112,7 @@ int main(int argc, char *argv[])
command_args[0] = command;
for (int i = 0 ; i < command_args_length ; i++) {
command_args[i + 1] = argv[index + i + 1];
g_print("%s\n", command_args[i+1]);
}
command_args[command_args_length + 1] = NULL;
gchar *stdout_fifo = g_strdup("/dev/null");
Expand Down

0 comments on commit 7704b22

Please sign in to comment.