Commit c4a117dd authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Ensure file descriptors with sockets in them go through the right APIs

Summary: These should be being created via the socket file descriptor map, not out on it's own.

Reviewed By: yfeldblum

Differential Revision: D14594655

fbshipit-source-id: 46cf5d5aa4e05b1235af396656cbd156eed46aed
parent 28aa8674
......@@ -243,10 +243,8 @@ int socketpair(int domain, int type, int protocol, int sv[2]) {
if (r == -1) {
return r;
}
sv[0] =
_open_osfhandle(static_cast<intptr_t>(pair[0].data), O_RDWR | O_BINARY);
sv[1] =
_open_osfhandle(static_cast<intptr_t>(pair[1].data), O_RDWR | O_BINARY);
sv[0] = network_socket_to_fd(pair[0]);
sv[1] = network_socket_to_fd(pair[1]);
return 0;
}
} // namespace sockets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment