From 2772f5c6a6a51cf946fd95bf6ffe254273157a21 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 2 Apr 2009 23:06:37 +0000 Subject: 2009-04-03 Samuel Thibault * exec.c (prepare): Call PREPARE_STREAM earlier to permit calling finish_mapping on E even after errors, as is already done in do_exec. --- exec/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'exec/exec.c') diff --git a/exec/exec.c b/exec/exec.c index 05dc883e..cb3d7418 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -726,6 +726,9 @@ prepare (file_t file, struct execdata *e) e->interp.section = NULL; + /* Initialize E's stdio stream. */ + prepare_stream (e); + /* Try to mmap FILE. */ e->error = io_map (file, &rd, &wr); if (! e->error) @@ -790,9 +793,6 @@ prepare (file_t file, struct execdata *e) e->file_size = st.st_size; e->optimal_block = st.st_blksize; } - - /* Initialize E's stdio stream. */ - prepare_stream (e); } /* Check the magic number, etc. of the file. -- cgit v1.2.3