aboutsummaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index 5822bb6..5dce5a9 100644
--- a/degesch.c
+++ b/degesch.c
@@ -10484,13 +10484,13 @@ spawn_helper_child (struct app_context *ctx)
}
static void
-launch_backlog_helper (struct app_context *ctx, FILE *backlog)
+launch_backlog_helper (struct app_context *ctx, int backlog_fd)
{
hard_assert (!ctx->running_backlog_helper);
switch (spawn_helper_child (ctx))
{
case 0:
- dup2 (fileno (backlog), STDIN_FILENO);
+ dup2 (backlog_fd, STDIN_FILENO);
execl ("/bin/sh", "/bin/sh", "-c", get_config_string
(ctx->config.root, "behaviour.backlog_helper"), NULL);
print_error ("%s: %s",
@@ -10522,7 +10522,7 @@ display_backlog (struct app_context *ctx)
rewind (backlog);
set_cloexec (fileno (backlog));
- launch_backlog_helper (ctx, backlog);
+ launch_backlog_helper (ctx, fileno (backlog));
fclose (backlog);
}
@@ -10544,7 +10544,7 @@ display_full_log (struct app_context *ctx)
fflush (ctx->current_buffer->log_file);
set_cloexec (fileno (full_log));
- launch_backlog_helper (ctx, full_log);
+ launch_backlog_helper (ctx, fileno (full_log));
fclose (full_log);
}