From 6d537c419e7a77e740d8b581ecc05afee28c7dae Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 7 Jun 2015 00:05:33 +0900 Subject: [PATCH] nghttpx: Document failure case on bind() --- src/shrpx.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shrpx.cc b/src/shrpx.cc index ba5c023a..1392c450 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -357,6 +357,9 @@ std::unique_ptr create_acceptor(ConnectionHandler *handler, } #endif // TCP_DEFER_ACCEPT + // When we are executing new binary, and the old binary did not + // bind privileged port (< 1024) for some reason, binding to those + // ports will fail with permission denied error. if (bind(fd, rp->ai_addr, rp->ai_addrlen) == -1) { auto error = errno; LOG(WARN) << "bind() syscall failed, error=" << error;