From 4db205dc7c0195cacc949cfbc461350ca6ec74b0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 1 Apr 2014 12:28:15 -0600 Subject: [PATCH 1/1] Properly initialize shadow_fd to -1 We forget that in one case, causing all sorts of issues when we end up closing this bogus (STDIN) descriptor. Signed-off-by: Jens Axboe --- filesetup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/filesetup.c b/filesetup.c index db80a8b7..fd55cc4b 100644 --- a/filesetup.c +++ b/filesetup.c @@ -1421,6 +1421,7 @@ void dup_files(struct thread_data *td, struct thread_data *org) assert(0); } __f->fd = -1; + __f->shadow_fd = -1; fio_file_reset(td, __f); if (f->file_name) { -- 2.25.1