]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/posix-process: Fix assertion in execve()
authorMichalis Pappas <michalis@unikraft.io>
Wed, 26 Mar 2025 07:51:08 +0000 (08:51 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Wed, 30 Apr 2025 09:42:51 +0000 (09:42 +0000)
Update assertion to check against UK_PID_INIT instead of zero.

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

lib/posix-process/execve.c

index f04cf20ed58ba44870fc66dd25987380781a3a9a..55d48e04ab44dfa58862bebf20bb2ecc104ff345 100644 (file)
@@ -46,7 +46,7 @@ static void __noreturn execve_ctx_switch(long arg0, long arg1)
         */
        if (!pthread_parent) {
                UK_ASSERT(pthread->process);
-               UK_ASSERT(pthread->process->pid == 0);
+               UK_ASSERT(pthread->process->pid == UK_PID_INIT);
                goto switch_ctx;
        }