Make the SocketListener control pipe O_CLOEXEC.
Children of processes that use SocketListener should not be able
to stop the SocketListener.
Test: builds, boots
Test: atest libsysutils_tests
Test: atest --test-mapping system/netd
Bug: 131268436
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I64898d9966f62004468b8e8a43b59be4a81a8cc4
Merged-In: I64898d9966f62004468b8e8a43b59be4a81a8cc4
(cherry picked from commit dae0195380)
This commit is contained in:
parent
b562e68503
commit
f38e182fbf
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue