From: Jens Axboe Date: Thu, 8 Mar 2007 13:09:59 +0000 (+0100) Subject: null engine: don't dup() stdin anymore X-Git-Tag: fio-1.14~63 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=640e94218b780e3d7b15758c760e59f3511f0933;hp=860a3044085c676632f9832a78133cd9847cbe62 null engine: don't dup() stdin anymore We can now track fd independently of ->fd, so don't open a file we don't have to use. Signed-off-by: Jens Axboe --- diff --git a/engines/null.c b/engines/null.c index d61685c7..cd446b99 100644 --- a/engines/null.c +++ b/engines/null.c @@ -32,7 +32,6 @@ static int fio_null_setup(struct thread_data *td) td->total_io_size = td->io_size; for_each_file(td, f, i) { - f->fd = dup(STDOUT_FILENO); f->real_file_size = td->total_io_size / td->nr_files; f->file_size = f->real_file_size; } @@ -43,6 +42,7 @@ static int fio_null_setup(struct thread_data *td) static int fio_null_open(struct thread_data fio_unused *td, struct fio_file fio_unused *f) { + f->fd = 0; return 0; }