Don't attempt to lock the file descriptor in readv/writev if it's a socket
authorChristopher Dykes <cdykes@fb.com>
Sun, 2 Jul 2017 06:50:37 +0000 (23:50 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 2 Jul 2017 06:57:43 +0000 (23:57 -0700)
commitedf661e64a593de14b6fa8b3686fc12b51a51ea0
treee25ca6528f50cd725496bcab378e9c6c2b062e00
parenta4b806047f70a58927ce78454319b03d9f60d420
Don't attempt to lock the file descriptor in readv/writev if it's a socket

Summary:
There is no way to lock a socket on Windows, so these calls will always fail. Just don't do the lock on Windows.
To do it properly with sockets, this should probably be forwarding to `sendmsg`/`recvmsg`, but this is good enough for now.

Reviewed By: simpkins

Differential Revision: D5307901

fbshipit-source-id: 9855274e932a3e2ec3cacae10363200187e0c01b
folly/portability/SysUio.cpp