# Clean up the fork code, fixing a bogus return value, and adding some # whitespace Index: um/arch/um/kernel/process.c =================================================================== --- um.orig/arch/um/kernel/process.c 2004-08-10 13:42:51.000000000 -0400 +++ um/arch/um/kernel/process.c 2004-08-11 21:32:08.000000000 -0400 @@ -119,10 +119,14 @@ /* Start the process and wait for it to kill itself */ new_pid = clone(outer_tramp, (void *) sp, clone_flags, &arg); - if(new_pid < 0) return(-errno); + if(new_pid < 0) + return(new_pid); + CATCH_EINTR(err = waitpid(new_pid, &status, 0)); - if(err < 0) panic("Waiting for outer trampoline failed - errno = %d", - errno); + if(err < 0) + panic("Waiting for outer trampoline failed - errno = %d", + errno); + if(!WIFSIGNALED(status) || (WTERMSIG(status) != SIGKILL)) panic("outer trampoline didn't exit with SIGKILL, " "status = %d", status);