Move problem 1-2 (join) into project 2 as the "wait" system call.
[pintos-anon] / grading / userprog / wait-killed.c
diff --git a/grading/userprog/wait-killed.c b/grading/userprog/wait-killed.c
new file mode 100644 (file)
index 0000000..f1ee40c
--- /dev/null
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (void) 
+{
+  printf ("(wait-killed) begin\n");
+  printf ("(wait-killed) wait(exec()) = %d\n", wait (exec ("child-bad")));
+  printf ("(wait-killed) end\n");
+  return 0;
+}