PKUOS - Pintos
Pintos source browser for PKU Operating System 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
8void
9test_main (void)
10{
11 open (NULL);
12}
int open(const char *file)
Definition: syscall.c:103
void test_main(void)
Tries to open a file with the null pointer as its name.
Definition: open-null.c:9
#define NULL
Definition: stddef.h:4