Просмотр исходного кода

actually update retval in getpid

tarfeef101 6 лет назад
Родитель
Сommit
a982f748c5

BIN
kern/compile/ASST2/kernel


+ 1 - 1
kern/compile/ASST2/vers.c

@@ -1,3 +1,3 @@
 /* This file is automatically generated. Edits will be lost.*/
-const int buildversion = 66;
+const int buildversion = 67;
 const char buildconfig[] = "ASST2";

+ 1 - 1
kern/compile/ASST2/version

@@ -1 +1 @@
-66
+67

+ 1 - 0
kern/syscall/proc_syscalls.c

@@ -184,6 +184,7 @@ int sys_waitpid(pid_t pid, userptr_t status, int options, pid_t * retval)
   lock_acquire(target->waitlock);
   cv_wait(target->waiting, target->waitlock);
   lock_release(target->waitlock);
+  *retval = target->exitcode;
   proc_destroy(target);
   return 0;
 }