From fa0f59304ff71f7116b4ca9f7d24e8c6d9ac4fe8 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 7 Dec 2023 20:13:36 +0200 Subject: [server] Implemented CLI with the ability to stop the server --- util.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util.c') diff --git a/util.c b/util.c index 99dafdc..6a0c0a3 100644 --- a/util.c +++ b/util.c @@ -9,6 +9,12 @@ uint16_t inet_atop(const char *port) { return htons(atoi(port)); } +void herrc(int output, const char* funcName) { + if (output < 0 && errno != EINTR) { + perror(funcName); + } +} + void herr(int output, const char* funcName) { if (output < 0) { perror(funcName); -- cgit v1.2.3