From 87b0db3943d6a27517809b79fc1b56f74c0d8ea4 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Sun, 15 Nov 2020 11:57:25 -0600 Subject: Add VScode stuffs --- P3/server.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'P3') 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) +} + -- cgit v1.2.3