Verified Commit fd97fa80 authored by 4lDO2's avatar 4lDO2 🖖
Browse files

Move `pid` back to inner scope in exit() handler.

parent a771ca69
......@@ -1128,8 +1128,6 @@ pub fn fexec(fd: FileHandle, arg_ptrs: &[[usize; 2]], var_ptrs: &[[usize; 2]]) -
pub fn exit(status: usize) -> ! {
ptrace::breakpoint_callback(PTRACE_STOP_EXIT, Some(ptrace_event!(PTRACE_STOP_EXIT, status)));
let pid;
{
let context_lock = {
let contexts = context::contexts();
......@@ -1138,7 +1136,7 @@ pub fn exit(status: usize) -> ! {
};
let mut close_files = Vec::new();
pid = {
let pid = {
let mut context = context_lock.write();
{
let mut lock = context.files.write();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment