Merge "Make the SocketListener control pipe O_CLOEXEC." into qt-dev

This commit is contained in:
Maciej Zenczykowski 2019-05-09 23:45:07 +00:00 committed by Android (Google) Code Review
commit 6a2b82e654

View file

@ -95,7 +95,7 @@ int SocketListener::startListener(int backlog) {
} else if (!mListen)
mClients[mSock] = new SocketClient(mSock, false, mUseCmdNum);
if (pipe(mCtrlPipe)) {
if (pipe2(mCtrlPipe, O_CLOEXEC)) {
SLOGE("pipe failed (%s)", strerror(errno));
return -1;
}