From: Jens Axboe Date: Tue, 1 Apr 2014 18:28:15 +0000 (-0600) Subject: Properly initialize shadow_fd to -1 X-Git-Tag: fio-2.1.8~32 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4db205dc7c0195cacc949cfbc461350ca6ec74b0;hp=ece6d647df9a5885ce5325e3e66e4c65d8180e61 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 --- 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) {