Replace CONFIG_LIBPOSIX_PROCESS_PIDS and CONFIG_LIBPOSIX_PROCESS_CLONE
with a single option, CONFIG_LIBPOSIX_PROCESS_MULTITHREADING. This
option enables clone(), _exit(), and exit_group() syscalls as well as
the core logic of libposix-process. Make options previously relevant
to CONFIG_LIBPOSIX_PROCESS_CLONE move to subselection of multithreading.
Without CONFIG_LIBPOSIX_PROCESS_MULTITHREADING the implementation falls
back into stubs. This provides an execution environment for simple
libc-based applications that don't require multithreading, but still
need to execute under a process-like environment. Under this state,
the syscalls involved in multithreading (or multiprocess) return an
error, while others are emulated. Notice that if Unikraft is not configured
to execute main() in a separate uk_thread (i.e. LIBUKBOOT_MAINTHREAD),
_exit() and exit_group() are not available.
Introduce a new config option to enable multiprocess support, namely
CONFIG_LIBPOSIX_PROCESS_MULTIPROCESS. This option replaces the config
option of vfork(), and enforces the selection of multithreading and
execve().
Signed-off-by: Michalis Pappas <michalis@unikraft.io> Approved-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Sergiu Moga <sergiu@unikraft.io> Reviewed-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1627