Comment 1 for bug 1849971

Revision history for this message
Olaf Seibert (rhialto) wrote :

A short experiment with python to show that shutdown doesn't just always fails with EINVAL:

$ cat sock.py
import socket

s = socket.create_connection(('127.0.0.1', 22))
s.shutdown(socket.SHUT_RDWR)
print(socket.SHUT_RDWR)
s.shutdown(3) # deliberate error
$ python3.7 sock.py
2
Traceback (most recent call last):
  File "sock.py", line 6, in <module>
    s.shutdown(3)
OSError: [Errno 22] Invalid argument