[task] Drop debug output for fork stacks (that's all cleared up)
This commit is contained in:
parent
3017ffb8e7
commit
c430668e8a
@ -135,7 +135,7 @@ fork() {
|
||||
new_task->esp = esp + (new_task->stack - current_task->stack);
|
||||
new_task->ebp = ebp - (current_task->stack - new_task->stack);
|
||||
}
|
||||
kprintf("old: %x new: %x; end: %x %x\n", esp, new_task->esp, current_task->stack, new_task->stack);
|
||||
// kprintf("old: %x new: %x; end: %x %x\n", esp, new_task->esp, current_task->stack, new_task->stack);
|
||||
memcpy((void *)(new_task->stack - KERNEL_STACK_SIZE), (void *)(current_task->stack - KERNEL_STACK_SIZE), KERNEL_STACK_SIZE);
|
||||
new_task->eip = eip;
|
||||
__asm__ __volatile__ ("sti");
|
||||
|
@ -10,11 +10,12 @@ int main(int argc, char ** argv) {
|
||||
syscall_print(x);
|
||||
syscall_print("\n");
|
||||
int i = syscall_getpid();
|
||||
for (int j = 0; j < 5; ++j) {
|
||||
syscall_fork();
|
||||
if (syscall_getpid() != i) {
|
||||
syscall_print("Herp!\n");
|
||||
syscall_print("[Forked]\n");
|
||||
char * bin = "/bin/echo";
|
||||
char * args = "von derpington";
|
||||
char * args = "Executed echo.";
|
||||
char * argv_[] = {
|
||||
bin,
|
||||
args,
|
||||
@ -22,7 +23,8 @@ int main(int argc, char ** argv) {
|
||||
};
|
||||
syscall_execve(bin, argv_, 0);
|
||||
} else {
|
||||
syscall_print("Awe shucks\n");
|
||||
syscall_print("(hello from parent)\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user