summaryrefslogtreecommitdiff
path: root/exec
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-04-02 23:06:37 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-04-02 23:06:37 +0000
commit2772f5c6a6a51cf946fd95bf6ffe254273157a21 (patch)
tree007a55ef9f5461d84050de8fcc20efcb01cfbad1 /exec
parent30c7c06aca35c9dd03c63be263f0ae5187460e8f (diff)
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.
Diffstat (limited to 'exec')
-rw-r--r--exec/ChangeLog5
-rw-r--r--exec/exec.c6
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.