aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-15 12:44:33 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-15 12:44:33 -0600
commit82c5bcf061b523ae30d7153a46d70b06faf451f8 (patch)
tree4ccba34c768a51d9dbcd6c864609d60b406ba665
parentAdd loop (diff)
downloadcsci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.tar
csci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.tar.gz
csci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.tar.bz2
csci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.tar.lz
csci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.tar.xz
csci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.tar.zst
csci4061-82c5bcf061b523ae30d7153a46d70b06faf451f8.zip
Add more, probably
-rw-r--r--P3/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/P3/server.c b/P3/server.c
index a42c578..3a2a537 100644
--- a/P3/server.c
+++ b/P3/server.c
@@ -171,7 +171,10 @@ int main(int argc, char **argv) {
// Open log file
FILE* logfile = fopen("serverlog.txt", "a+");
// Change the current working directory to server root directory
- chdir("testing/");
+ if (chdir("testing") == -1) {
+ perror("Could not find root webserver directory testing. Exiting\n");
+ return -1;
+ }
// Initialize cache (extra credit B)
// Start the server