PKUOS - Pintos
Pintos source browser for PKU Operating System course
Functions | Variables
child-close.c File Reference
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <syscall.h>
#include "tests/lib.h"
Include dependency graph for child-close.c:

Go to the source code of this file.

Functions

int main (int argc UNUSED, char *argv[])
 

Variables

const char * test_name = "child-close"
 Child process run by multi-child-fd test. More...
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *  argv[] 
)

Definition at line 19 of file child-close.c.

References atoi(), close(), fail(), isdigit(), and msg().

Here is the call graph for this function:

Variable Documentation

◆ test_name

const char* test_name = "child-close"

Child process run by multi-child-fd test.

Child process for syn-read test.

Attempts to close the file descriptor passed as the first command-line argument. This is invalid, because file descriptors are not inherited in Pintos. Two results are allowed: either the system call should return without taking any action, or the kernel should terminate the process with a -1 exit code.

Definition at line 16 of file child-close.c.