mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1672219 - nsServerSocket fd should not be inheritable by the child process r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D94263
This commit is contained in:
parent
92ae4518de
commit
237dbb5237
@ -184,6 +184,7 @@ void nsServerSocket::OnSocketReady(PRFileDesc* fd, int16_t outFlags) {
|
||||
mCondition = NS_ERROR_UNEXPECTED;
|
||||
return;
|
||||
}
|
||||
PR_SetFDInheritable(clientFD, false);
|
||||
|
||||
NetAddr clientAddr(&prClientAddr);
|
||||
// Accept succeeded, create socket transport and notify consumer
|
||||
@ -352,6 +353,8 @@ nsServerSocket::InitWithAddress(const PRNetAddr* aAddr, int32_t aBackLog) {
|
||||
return ErrorAccordingToNSPR(PR_GetError());
|
||||
}
|
||||
|
||||
PR_SetFDInheritable(mFD, false);
|
||||
|
||||
PRSocketOptionData opt;
|
||||
|
||||
opt.option = PR_SockOpt_Reuseaddr;
|
||||
|
Loading…
Reference in New Issue
Block a user