Get rid of unnecessary barrier. Improve comment.
[pintos-anon] / grading / userprog / close-twice.c
1 #include <stdio.h>
2 #include <syscall.h>
3
4 int
5 main (void) 
6 {
7   int handle;
8   printf ("(close-twice) begin\n");
9   handle = open ("sample.txt");
10   if (handle < 2)
11     printf ("(close-twice) fail: open() returned %d\n", handle);
12   close (handle);
13   close (handle);
14   printf ("(close-twice) end\n");
15   return 0;
16 }