How to solve the unable to select error in php stream_select?

error details are shown below:

clipboard.png

clipboard.png

the running environment of the program in which the error occurs: the program opens multiple processes listening to the same port, while endless loop 1us calls stream_select to accept client connections + read client messages, and press ctrl + c to control the error when the process exits.

what is the reason for this? How to solve the problem?

Feb.28,2021

The reason for the

error is that you pressed < kbd > CTRL < / kbd > + < kbd > C < / kbd >. The solution is not to press < kbd > CTRL < / kbd > + < kbd > C < / kbd >

.

if you are in Linux/Unix, you can use the pcntl_signal () function to handle the interrupt signal. Just set the variable when you receive the signal and let your dead loop exit normally.

Menu