Minor fixes in proc.

fork() is still "intentionally" broken as wrong stack frame is copied
during thread_fork.