FORKgit add .git add .!
This commit is contained in:
@@ -124,7 +124,6 @@ static int32_t sys_pty(int* slave_fd) {
|
||||
|
||||
static int32_t sys_fork(registers_t* parent_regs) {
|
||||
process_t* parent = current_task();
|
||||
|
||||
process_t* child = kalloc(sizeof(process_t));
|
||||
if (!child) {
|
||||
return -1;
|
||||
@@ -149,11 +148,8 @@ static int32_t sys_fork(registers_t* parent_regs) {
|
||||
child_regs->eax = 0;
|
||||
child->esp = (uint32_t)child_regs;
|
||||
|
||||
kprintf("child registers for PID %d\n", child->pid);
|
||||
kprintf("\tEIP: 0x%x\n", child_regs->eip);
|
||||
|
||||
// uint32_t cr3 = (uint32_t)clone_task_pd();
|
||||
child->cr3 = parent->cr3;
|
||||
uint32_t cr3 = (uint32_t)clone_current_pd();
|
||||
child->cr3 = cr3;
|
||||
|
||||
add_task(child);
|
||||
return child->pid;
|
||||
|
||||
Reference in New Issue
Block a user