I'm writing a single threaded select server where a user can add listen sockets dynamically. The problem is that if someone wants to add a listen socket, the server won't select on that new socket until something happens on one of the other sockets.

One workaround I thought of was to add a fake socket to the list that I could signal whenever a new listen socket was added in order to force the server to add the new listen socket to the list. This solution seems a little "hacky" to me and I wanted to know if anyone else had any ideas.