From b62d6af33a473cbd205e1797f099a351071c9ac3 Mon Sep 17 00:00:00 2001 From: Mikael Asplund Date: Wed, 12 Feb 2020 13:14:55 +0100 Subject: Added test files for lab 3 and 4 --- src/examples/lab3test1.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 src/examples/lab3test1.c (limited to 'src/examples/lab3test1.c') diff --git a/src/examples/lab3test1.c b/src/examples/lab3test1.c new file mode 100755 index 0000000..a0070c3 --- /dev/null +++ b/src/examples/lab3test1.c @@ -0,0 +1,17 @@ +#include +#include + +//compile it, copy to the pintos virtual disk an call this program with arguments using the command +// pintos --qemu -- run lab3test1 +//if lab 3 is correctly implemented this program should call itself in an infinite loop and spawn itself as a child process indefinetly +//the PID of each child process created should be printed to the screen +// In order to see if your implementation works check if the PID of each new child process is incremented as it should + +int +main (int argc, char *argv[]) +{ + int pid=exec("lab3test1"); + printf("Child process ID: %d",pid); + + return EXIT_SUCCESS; +} -- cgit v1.2.1