Skip to content

Commit fe1ec2b

Browse files
process::exit: log the process path on exit
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent dfe8a3a commit fe1ec2b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/aero_kernel/src/syscall/process.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@ pub fn exit(status: usize) -> Result<usize, SyscallError> {
4444

4545
#[cfg(not(feature = "ci"))]
4646
{
47-
log::trace!(
48-
"exiting the process (pid={pid}) with status: {status}",
49-
pid = scheduler::get_scheduler().current_task().pid().as_usize(),
50-
status = status
51-
);
47+
let current_task = scheduler::get_scheduler().current_task();
48+
let pid = current_task.pid().as_usize();
49+
let path = current_task.path();
5250

53-
crate::unwind::unwind_stack_trace();
51+
log::trace!("exiting the process (pid={pid}, path={path:?}) with status: {status}");
5452

53+
crate::unwind::unwind_stack_trace();
5554
scheduler::get_scheduler().exit(status as isize);
5655
}
5756
}

0 commit comments

Comments
 (0)