basically you need to let select() return earlier. you may: 1. send a signal (you need to use pselect() instead); 2. use a phony pipe between 2 threads, and also select on this phony pipe. when server create new socket, send something to the pipe.
【在 t****t 的大作中提到】 : basically you need to let select() return earlier. you may: 1. send a signal : (you need to use pselect() instead); 2. use a phony pipe between 2 threads, : and also select on this phony pipe. when server create new socket, send : something to the pipe.