Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

part3/webservice3e no occur errno.EINTR on maxos #13

Open
zhwindy opened this issue Apr 16, 2019 · 3 comments
Open

part3/webservice3e no occur errno.EINTR on maxos #13

zhwindy opened this issue Apr 16, 2019 · 3 comments

Comments

@zhwindy
Copy link

zhwindy commented Apr 16, 2019

test webservice3e.py with curl commands。There is no socket.error :[Errno 4] Interrupted system call when socket.accetp(). what happened ?

@CliveUnger
Copy link

I also failed to produced this error for websevice3e.py. My thought is that it only occurs when the interrupt happens during the .accept() part of the code, so catching that part exactly is hard to reproduce. The author thus shows the error as something that can potentially happen, although that is not made clear. Clarification would be greatly appreciated!

(I am running on WSL Ubuntu)

@CliveUnger
Copy link

CliveUnger commented Sep 14, 2021

Further discovery: I can reproduce the error with Python 2.7.17 but not Python 3.6.9. The code indicates it was test for Python 2.7.9 and Python 3.4. I imagine there was some update between Python 3.4 and 3.6.9 that changes the behavior of system interrupts while a socket is open.

Looks like PEP 475 included in Python 3.5 changed the behavior of how system call wrappers handle interrupts. They are now retried automatically.

@zhwindy
Copy link
Author

zhwindy commented Oct 15, 2021

emm...I'm almost forget this issue, time really flies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants