1 /* Child process run by multi-child-fd test.
3 Attempts to close the file descriptor passed as the first
4 command-line argument. This is invalid, because file
5 descriptors are not inherited in Pintos. Two results are
6 allowed: either the system call should return without taking
7 any action, or the kernel should terminate the process with a
14 #include "tests/lib.h"
16 const char *test_name = "child-close";
19 main (int argc UNUSED, char *argv[])
22 if (!isdigit (*argv[1]))
23 fail ("bad command-line arguments");
24 close (atoi (argv[1]));