From 485a2cb0bed24237acb8b06e7a360ff0a22a8757 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Sun, 15 Nov 2020 14:33:44 -0600 Subject: add s p a c i n g --- P3/server.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'P3') diff --git a/P3/server.c b/P3/server.c index 89d425d..d709198 100644 --- a/P3/server.c +++ b/P3/server.c @@ -134,13 +134,28 @@ int main(int argc, char **argv) { } // Get the input args + + //Port int port = argv[3]; + + //Webroot path char* path = argv[4]; + + //(static) number of dispatchers int dispatchers = argv[5]; + + //(static) number of workers int workers = argv[6]; - int dynFlag = argv[7]; + + //Dynamic worker flag + bool dynFlag = argv[7]; + + //Queue Length int qLen = argv[8]; + + //Max cache size int cSiz = argv[9]; + // Perform error checks on the input arguments if (port < 1025 || port > 65535) { perror("Invalid port. Port must be greater than 1024 or less than 65536.\n"); @@ -214,6 +229,8 @@ int main(int argc, char **argv) { printf("This should never be printed."); return 42; } + +//Placeholder name. Sets exit flag so process can die happily and not sad. static void eggs(int signo) { exitFlag |= 1; } -- cgit v1.2.3