"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
"Omar Polo" <op@omarpolo.com>
Subject:
Re: gotd accept error handling
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 03 Oct 2025 13:09:33 +0200

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> wrote:
> Prevent gotd looping on unhandled errors raised by accept().
> 
> gotd would somehow loop on ENOTSOCK in a case observed by "noodle" on IRC.
> For now, exit the event loop if an unknown accept error occurs rather
> sending a storm of errors to syslog.
> 
> ok?

too late for this, but good that's already in the tree.

> (I do not understand the root cause of the ENOTSOCK issue. Any ideas?)

this worries me a bit tho.  if we close the listening socket we should
get EBADF, not ENOTSOCK.  I can explain this by assuming that we ended
up closing the listening socket and then opening something else, before
falling back to accept() again where it would complain that's not a socket.q

weird