Skip to content

Commit

Permalink
all-OK
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkaild_Lu committed Nov 20, 2024
1 parent e103108 commit 79fedd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion os/src/task/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,14 @@ impl TaskControlBlock {
let pid_handle = pid_alloc();
let kernel_stack = kstack_alloc();
let kernel_stack_top = kernel_stack.get_top();
let new_fd_table: Vec<Option<Arc<dyn File + Send + Sync>>> = Vec::new();
let mut new_fd_table: Vec<Option<Arc<dyn File + Send + Sync>>> = Vec::new();
for fd in parent_inner.fd_table.iter() {
if let Some(file) = fd {
new_fd_table.push(Some(file.clone()));
} else {
new_fd_table.push(None);
}
}
let task_control_block = Arc::new(TaskControlBlock {
pid: pid_handle,
kernel_stack,
Expand Down
1 change: 1 addition & 0 deletions rustsbi
Submodule rustsbi added at 1cc80c

0 comments on commit 79fedd2

Please sign in to comment.