UlricE / pen

Pen
Other
250 stars 41 forks source link

Handle EAGAIN and EINTR in do_ctrl #50

Open ifduyue opened 5 years ago

ifduyue commented 5 years ago

Function do_ctrl doesn't handle EAGAIN, so sometimes penctl fails with error reading from socket. This PR patched function do_ctrl and handled EAGAIN and EINTR. I don't know if it is better to wrap my_recv and handle EAGAIN, there are many locations that my_recv is invoked. I only observed EAGAIN in function do_ctrl.