diff options
Diffstat (limited to 'tests/userprog/close-stdout.c')
| -rw-r--r-- | tests/userprog/close-stdout.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/userprog/close-stdout.c b/tests/userprog/close-stdout.c new file mode 100644 index 0000000..886523f --- /dev/null +++ b/tests/userprog/close-stdout.c | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | /* Tries to close the console output stream, which must either | ||
| 2 | fail silently or terminate with exit code -1. */ | ||
| 3 | |||
| 4 | #include <syscall.h> | ||
| 5 | #include "tests/main.h" | ||
| 6 | |||
| 7 | void | ||
| 8 | test_main (void) | ||
| 9 | { | ||
| 10 | close (1); | ||
| 11 | } | ||
