CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions | Variables
child-rox.c File Reference
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <syscall.h>
#include "tests/lib.h"
Include dependency graph for child-rox.c:

Go to the source code of this file.

Functions

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

Variables

const char * test_name = "child-rox"
 Child process run by rox-child and rox-multichild tests. More...
 

Function Documentation

◆ main()

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

Definition at line 32 of file child-rox.c.

References atoi(), CHECK, exec(), fail(), isdigit(), msg(), quiet, snprintf(), try_write(), and wait().

Here is the call graph for this function:

◆ try_write()

static void try_write ( void  )
static

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

References buffer, CHECK, close(), open(), quiet, and write().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ test_name

const char* test_name = "child-rox"

Child process run by rox-child and rox-multichild tests.

Child process for syn-read test.

Opens and tries to write to its own executable, verifying that that is disallowed. Then recursively executes itself to the depth indicated by the first command-line argument.

Definition at line 13 of file child-rox.c.