瀏覽代碼

actually update retval in getpid

tarfeef101 6 年之前
父節點
當前提交
a982f748c5
共有 4 個文件被更改,包括 3 次插入2 次删除
  1. 二進制
      kern/compile/ASST2/kernel
  2. 1 1
      kern/compile/ASST2/vers.c
  3. 1 1
      kern/compile/ASST2/version
  4. 1 0
      kern/syscall/proc_syscalls.c

二進制
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;
 }