diff --git a/e2fsck/logfile.c b/e2fsck/logfile.c index c48b8eb8..e004f31a 100644 --- a/e2fsck/logfile.c +++ b/e2fsck/logfile.c @@ -20,6 +20,8 @@ #include "e2fsck.h" #include +extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */ + struct string { char *s; int len; @@ -233,6 +235,8 @@ static FILE *save_output(const char *s0, const char *s1, const char *s2) } if (pid == 0) { + if (e2fsck_global_ctx && e2fsck_global_ctx->progress_fd) + close(e2fsck_global_ctx->progress_fd); if (daemon(0, 0) < 0) { perror("daemon"); exit(1);