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);