]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/posix-process: Add exit() and exit_group()
authorMichalis Pappas <michalis@unikraft.io>
Fri, 7 Mar 2025 07:17:24 +0000 (08:17 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Wed, 30 Apr 2025 09:56:07 +0000 (09:56 +0000)
commit7a013bf2f8d54a943ff51966dfd1632b4c4bc774
tree90c9bd78235a61f20a35c54740b653869719a61e
parent8b9c32579c7d86638077d5087afed0a4c07988e6
lib/posix-process: Add exit() and exit_group()

exit() terminates the calling thread, and the process if it's the last /
only thread in the process. exitgroup() termintates the calling process
leaving it in the zombie state for wait() to reap. for more info see
exit(2) and exit_group(2).

Internally, exit() and exit_group() issue the POSIX_THREAD_EXIT_EVENT
and POSIX_PROCESS_EXIT_EVENT respectively, to notify libraries that have
registered event handlers to these events.

Checkpatch-Ignore: LONG_LINE
Checkpatch-Ignore: MACRO_ARG_REUSE
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1630
lib/posix-process/Config.uk
lib/posix-process/Makefile.uk
lib/posix-process/execve.c
lib/posix-process/exit.c [new file with mode: 0644]
lib/posix-process/include/uk/process.h
lib/posix-process/process.c
lib/posix-process/process.h