Socket: Only catch select.error if it is an interupted system call.
Fix crash when --daemon is given (Python 3).
io.StringIO has no attribute 'reset'.
Fix @version in Python 3.