Fix'd

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
karloathian
Posts: 22
Joined: Fri Mar 28, 2008 12:09 am

Fix'd

Post by karloathian »

I've started to implement process management into my kernel , and followed JamesM kernel tutorials to get me started ( and changed the implementation a bit ) , and to test out my process management tried to Fork() my kernel code.

The EIP is loaded at the end of the Fork() function , just before esp and eip are written to the task ,and the function makes sure to differenciate the Forked copy from the Forkee , and as long as the code remains inside the Fork() function everything runs fine but as soon as "return" is invoked the whole thing crashes with seemingly random errors depending on what the return point is.

My question really is , is it because of the stack and stack base pointers not pointing to a valid return address or is it because I'm using a faulty cloned page directory?

EDIT: Turns out I wasn't creating a stack for the new process and was using the old stack. So as soon as I requiered access to the stack , my objects were already out of scope
Post Reply