diff options
author | Matt Strapp <strap012@umn.edu> | 2020-11-17 15:00:44 -0600 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2020-11-17 15:00:44 -0600 |
commit | 438c8600e03650ec822afb89dfe1d9c8b963c236 (patch) | |
tree | 35e485c995135b68dc7207746ff8ff987c636542 | |
parent | add TODO (diff) | |
download | csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.tar csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.tar.gz csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.tar.bz2 csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.tar.lz csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.tar.xz csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.tar.zst csci4061-438c8600e03650ec822afb89dfe1d9c8b963c236.zip |
add comment
-rw-r--r-- | P3/server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/P3/server.c b/P3/server.c index 2353ed2..31c4db0 100644 --- a/P3/server.c +++ b/P3/server.c @@ -258,7 +258,7 @@ int main(int argc, char **argv) { if (sigemptyset(&act.sa_mask) == -1 || sigaction(SIGINT, &act, NULL) == -1) { perror("SIGINT Handler Error"); - return -1; + return -2; } // Open log file to make it exist FILE* logfile = fopen("webserver_log", "w"); @@ -267,7 +267,7 @@ int main(int argc, char **argv) { // Change the current working directory to server root directory if (chdir(path) == -1) { perror("Directory Change error"); - return -1; + return -2; } // Initialize cache (extra credit B) cache_entry_t *dynQ; @@ -280,6 +280,7 @@ int main(int argc, char **argv) { } } + //Make sure threads are all detached pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |