Website Summary Files Commits Branches @commit @diff @stats
path: root / util.c
diff options
context:
space:
mode:
Commitfa0f59304ff71f7116b4ca9f7d24e8c6d9ac4fe8 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-12-07 20:13:36 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-12-07 20:13:36 +0200
Files334c608d242cc129a61ee619378b552a5ce961e0 /util.c
pico-web-fa0f59304ff71f7116b4ca9f7d24e8c6d9ac4fe8.tar
pico-web-fa0f59304ff71f7116b4ca9f7d24e8c6d9ac4fe8.tar.gz
pico-web-fa0f59304ff71f7116b4ca9f7d24e8c6d9ac4fe8.zip
Parent4e0c662bf77e6345eea52d5ad1ee4287d4e42e8d (diff)
[server] Implemented CLI with the ability to stop the server
1 files changed, 6 insertions, 0 deletions
-rw-r--r--util.c6
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);