X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=client.cpp;h=26806d6fdcf53d88a2ae758adbbbce7c10e1b214;hp=f02050b5588901fd31142558134899f59512464b;hb=6d34c5b6d8e5bec5d1421eadc103f38d206f34f1;hpb=8a89a1e1e9880cc7ddbd76bb26d3e0755becd4b9 diff --git a/client.cpp b/client.cpp index f02050b..26806d6 100644 --- a/client.cpp +++ b/client.cpp @@ -1,8 +1,10 @@ #include #include +#include #include #include #include +#include #include "client.h" #include "log.h" @@ -68,6 +70,10 @@ Client::Client(const ClientProto &serialized, const vectorpacing_rate, sizeof(stream->pacing_rate)) == -1) { if (stream->pacing_rate != ~0U) { @@ -115,6 +121,10 @@ Client::Client(const ClientProto &serialized, const vector *short_response_pool) const { + // Unset the close-on-exec flag for the socket. + // (This can't leak into a child, since there's only one thread left.) + fcntl(sock, F_SETFD, 0); + ClientProto serialized; serialized.set_sock(sock); serialized.set_remote_addr(remote_addr);