diff options
author | tomsmeding <tom.smeding@gmail.com> | 2019-11-23 23:36:14 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2019-11-23 23:36:43 +0100 |
commit | 4381cca95136b0a8222378a41ac0ebb1bc62ea80 (patch) | |
tree | cb68b2c041c19c0f9d3deaeda64a6fafd71f5f18 /util.h | |
parent | e2492535cf8ecff85595712e69774d94dd98a751 (diff) |
Use threads, not processes, to handle requests
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3,6 +3,9 @@ #include <sys/socket.h> +#define PTHREAD_CHECK(func_,...) do { int ret=(func_)(__VA_ARGS__); if(ret!=0){ fprintf(stderr,#func_ ": %s\n",strerror(ret)); exit(1); } } while(0) + + char* copy_buf(const char *buf,int len); char* copy_str(const char *str); |