Add explanatory comments to userprog tests.
[pintos-anon] / src / tests / userprog / child-close.c
index 83e3d06966cc8efabed1696a8ed5fc33f9511036..ac948c8efe6978e98960fceda85218b84a3c3415 100644 (file)
@@ -1,3 +1,12 @@
+/* Child process run by multi-child-fd test.
+
+   Attempts to close the file descriptor passed as the first
+   command-line argument.  This is invalid, because file
+   descriptors are not inherited in Pintos.  Two results are
+   allowed: either the system call should return without taking
+   any action, or the kernel should terminate the process with a
+   -1 exit code. */
+
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>