Output the worker id in [brackets].
Call the field 'tcp' instead 'active', less ambiguous.
Have separate states for "starting" and "running".
In workers s/exit/exiting/, s/EXIT_FLAG/WORKER_EXITING/
s/sock_t/relay_socket_t/
s/s_listen/listener/
Narrow loop variable scope if it is not needed after the loop.
Separate the common "base class" of workers.
s/s_output/output_socket/