Commit 6d537c41 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Document failure case on bind()

parent 4894e24d
......@@ -357,6 +357,9 @@ std::unique_ptr<AcceptHandler> 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment