projects
/
pintos-anon
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add problem 1-1 solution.
[pintos-anon]
/
grading
/
userprog
/
close-normal.c
1
#include <stdio.h>
2
#include <syscall.h>
3
4
int
5
main (void)
6
{
7
int handle;
8
printf ("(close-normal) begin\n");
9
handle = open ("sample.txt");
10
if (handle < 2)
11
printf ("(close-normal) fail: open() returned %d\n", handle);
12
close (handle);
13
printf ("(close-normal) end\n");
14
return 0;
15
}