CS318 - Pintos
Pintos source browser for JHU CS318 course
open-null.c
Go to the documentation of this file.
1 /** Tries to open a file with the null pointer as its name.
2  The process must be terminated with exit code -1. */
3 
4 #include <stddef.h>
5 #include <syscall.h>
6 #include "tests/main.h"
7 
8 void
9 test_main (void)
10 {
11  open (NULL);
12 }
NULL
#define NULL
Definition: stddef.h:4
test_main
void test_main(void)
Tries to open a file with the null pointer as its name.
Definition: open-null.c:9
open
int open(const char *file)
Definition: syscall.c:103
main.h
stddef.h