feat: proper cleanup for shared pages
This commit is contained in:
@@ -172,8 +172,9 @@ start_process (void *proc_start_data)
|
||||
to store the command that executed the process. */
|
||||
if (data->success)
|
||||
{
|
||||
data->success =
|
||||
process_init_stack (data->cmd_saveptr, &if_.esp, data->file_name);
|
||||
data->success = use_shared_file (exec_file)
|
||||
&& process_init_stack (data->cmd_saveptr, &if_.esp,
|
||||
data->file_name);
|
||||
}
|
||||
|
||||
/* Signal that the process has finished attempting to load. */
|
||||
@@ -366,6 +367,7 @@ process_exit (void)
|
||||
/* Clean up all open files */
|
||||
hash_destroy (&cur->open_files, fd_cleanup);
|
||||
hash_destroy (&cur->pages, page_cleanup);
|
||||
unuse_shared_file (cur->exec_file);
|
||||
|
||||
/* Close the executable file, implicitly allowing it to be written to. */
|
||||
if (cur->exec_file != NULL)
|
||||
|
||||
Reference in New Issue
Block a user