diff options
author | Matt Strapp <strap012@umn.edu> | 2020-11-15 11:57:25 -0600 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2020-11-15 11:57:25 -0600 |
commit | 87b0db3943d6a27517809b79fc1b56f74c0d8ea4 (patch) | |
tree | 54b655d49e43a307ba4aef7327f052653678138a | |
parent | Start dispatch (diff) | |
download | csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.tar csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.tar.gz csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.tar.bz2 csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.tar.lz csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.tar.xz csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.tar.zst csci4061-87b0db3943d6a27517809b79fc1b56f74c0d8ea4.zip |
Add VScode stuffs
-rw-r--r-- | .vscode/c_cpp_properties.json | 7 | ||||
-rw-r--r-- | P3/server.c | 18 |
2 files changed, 15 insertions, 10 deletions
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 6e3e2bc..8402ac0 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -5,10 +5,11 @@ "includePath": [ "${workspaceFolder}/P2/include" ], - "defines": [], + "defines": [ + "__USE_POSIX", + "_GNU_SOURCE" + ], "compilerPath": "/usr/bin/gcc", - "cStandard": "c11", - "cppStandard": "c++14", "intelliSenseMode": "gcc-x64" } ], diff --git a/P3/server.c b/P3/server.c index 8957d0d..87b8339 100644 --- a/P3/server.c +++ b/P3/server.c @@ -158,7 +158,9 @@ int main(int argc, char **argv) { return -1; } // Change SIGINT action for grace termination - + struct sigaction act; + sigset_t sigset; + act.sa_handler = eggs; // Open log file // Change the current working directory to server root directory @@ -166,17 +168,19 @@ int main(int argc, char **argv) { // Initialize cache (extra credit B) // Start the server - + init(port); // Create dispatcher and worker threads (all threads should be detachable) pthread_t thread; pthread_create(&thread, NULL, dispatch, NULL); // DEBUG! figure out last arg // Create dynamic pool manager thread (extra credit A) - // Terminate server gracefully - // Print the number of pending requests in the request queue - // close log file - // Remove cache (extra credit B) - return 0; } +static void eggs(int signo) { + // Terminate server gracefully + // Print the number of pending requests in the request queue + // close log file + // Remove cache (extra credit B) +} + |