diff options
-rw-r--r-- | exec/ChangeLog | 5 | ||||
-rw-r--r-- | exec/exec.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/exec/ChangeLog b/exec/ChangeLog index 5a0ad1d4..a9300bfa 100644 --- a/exec/ChangeLog +++ b/exec/ChangeLog @@ -1,3 +1,8 @@ +2009-04-03 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * exec.c (prepare): Call PREPARE_STREAM earlier to permit calling + finish_mapping on E even after errors, as is already done in do_exec. + 2008-06-10 Samuel Thibault <samuel.thibault@ens-lyon.org> * elfcore.c (TIME_VALUE_TO_TIMESPEC): Completely implement instead of 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. |