Update process.c

Added Setub for UnregisterProcess(p)
Error return values and checks fixed
Vars declared and other minor fixes.