From e8713e26c6cb16e3141f22e9a51e618e59781184 Mon Sep 17 00:00:00 2001 From: Themis Demetriades Date: Mon, 11 Nov 2024 22:51:19 +0000 Subject: [PATCH] Update variable references between conflicting merges to refer to the same data in stack initialization --- src/userprog/process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/userprog/process.c b/src/userprog/process.c index f5b54b7..1286893 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -137,7 +137,10 @@ start_process (void *proc_start_data) goto fail; } - struct file *exec_file = filesys_open (file_name); + /* NOTE: Currently, the file being executed is closed in load () and then + reopened here. Because load is an exported public function, this + might be necessary. */ + struct file *exec_file = filesys_open (data->file_name); thread_current ()->exec_file = exec_file; file_deny_write (exec_file);