CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions
multi-child-fd.c File Reference
#include <stdio.h>
#include <syscall.h>
#include "tests/userprog/sample.inc"
#include "tests/lib.h"
#include "tests/main.h"
Include dependency graph for multi-child-fd.c:

Go to the source code of this file.

Functions

void test_main (void)
 Opens a file and then runs a subprocess that tries to close the file. More...
 

Function Documentation

◆ test_main()

void test_main ( void  )

Opens a file and then runs a subprocess that tries to close the file.

tests/main.h

(Pintos does not have inheritance of file handles, so this must fail.) The parent process then attempts to use the file handle, which must succeed.

Definition at line 13 of file multi-child-fd.c.

References CHECK, check_file_handle(), exec(), msg(), open(), snprintf(), and wait().

Here is the call graph for this function: