From 135813ed67c548f16b0e1c36bfba747c2587a990 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 9 Feb 2023 17:53:42 +0100 Subject: [PATCH] defined die function --- src/chat/server/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/chat/server/main.c b/src/chat/server/main.c index 19b0d7a..08ecc53 100644 --- a/src/chat/server/main.c +++ b/src/chat/server/main.c @@ -21,7 +21,7 @@ along with this program. If not, see . #include #include -#include +void die(char *exit_message); int main(void) { @@ -56,4 +56,9 @@ int main(void) printf("%s\n", clientMsg); return 0; +} + +void die(char *exit_msg) +{ + fprintf(stderr, "%s\n", exit_msg); } \ No newline at end of file