PKUOS - Pintos
Pintos source browser for PKU Operating System course
exec-missing.c
Go to the documentation of this file.
1/** Tries to execute a nonexistent process.
2 The exec system call must return -1. */
3
4#include <syscall.h>
5#include "tests/lib.h"
6#include "tests/main.h"
7
8void
9test_main (void)
10{
11 msg ("exec(\"no-such-file\"): %d", exec ("no-such-file"));
12}
void test_main(void)
Tries to execute a nonexistent process.
Definition: exec-missing.c:9
pid_t exec(const char *file)
Definition: syscall.c:79
void msg(const char *format,...)
Definition: lib.c:28