nghttpx: Document failure case on bind()

This commit is contained in:
Tatsuhiro Tsujikawa 2015-06-07 00:05:33 +09:00
parent 4894e24dc8
commit 6d537c419e
1 changed files with 3 additions and 0 deletions

View File

@ -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;