-
Notifications
You must be signed in to change notification settings - Fork 1
[syscall] exit() #8
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededsyscallSyscalls related stuffSyscalls related stuff
Description
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededsyscallSyscalls related stuffSyscalls related stuff
Allow processes to neatly terminate using an exit() syscall.
Once a user program is done executing it should be able to call "exit()", and "exit()" should also be naturally called at the end of
_start()functions in user programs.exit syscall should have syscall number 3. it should also accept an exit code.
on os side, when a user does sys_exit, it should mark that user process as terminated in order to prevent the scheduler from trying to run it again. using Process::set_state.