diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-12-16 10:39:49 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-12-16 10:39:49 +0000 |
commit | 3764e6bfe73507819db9c06ff5130a72e2d762ad (patch) | |
tree | 67cfb4131cf26cc532790fac4cce0c07978c1ace | |
parent | c2debf6a725a4e7dc5abee3cb6196f0b3b8463fa (diff) | |
download | shibari-3764e6bfe73507819db9c06ff5130a72e2d762ad.tar.gz shibari-3764e6bfe73507819db9c06ff5130a72e2d762ad.tar.xz shibari-3764e6bfe73507819db9c06ff5130a72e2d762ad.zip |
With a selfpipe, the socket needs to be nb, duh
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r-- | src/server/shibari-server-tcp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/shibari-server-tcp.c b/src/server/shibari-server-tcp.c index ea93978..94d0ccd 100644 --- a/src/server/shibari-server-tcp.c +++ b/src/server/shibari-server-tcp.c @@ -16,6 +16,7 @@ #include <skalibs/sgetopt.h> #include <skalibs/sig.h> #include <skalibs/tai.h> +#include <skalibs/djbunix.h> #include <skalibs/ip46.h> #include <skalibs/cdb.h> #include <skalibs/unix-timed.h> @@ -176,6 +177,8 @@ int main (int argc, char const *const *argv) if (!cdb_init(&tdb, tdbfile)) strerr_diefu2sys(111, "open DNS database file ", tdbfile) ; } + if (ndelay_on(0) == -1 || ndelay_on(1) == -1) + strerr_diefu1sys(111, "set socket nonblocking") ; if (!sig_altignore(SIGPIPE)) strerr_diefu1sys(111, "ignore SIGPIPE") ; tain_now_set_stopwatch_g() ; shibari_log_start(verbosity, &remoteip, remoteport) ; |