PR_ASSERT(_PR_TRI_UNKNOWN != fd2->secret->inheritable); if (!fd2->secret->nonblocking && !fd2->secret->inheritable) {
if (!fd2->secret->nonblocking && fd2->secret->inheritable != _PR_TRI_TRUE) {
static PRFileDesc* PR_CALLBACK SocketAccept(PRFileDesc *fd, PRNetAddr *addr,PRIntervalTime timeout){	PRInt32 osfd;	PRFileDesc *fd2;	PRUint32 al;	PRThread *me = _PR_MD_CURRENT_THREAD();#ifdef WINNT	PRNetAddr addrCopy;#endif	if (_PR_PENDING_INTERRUPT(me)) {		me->flags &= ~_PR_INTERRUPT;		PR_SetError(PR_PENDING_INTERRUPT_ERROR, 0);		return 0;	}	if (_PR_IO_PENDING(me)) {		PR_SetError(PR_IO_PENDING_ERROR, 0);		return 0;	}#ifdef WINNT	if (addr == NULL) {		addr = &addrCopy;	}#endif	al = sizeof(PRNetAddr);	osfd = _PR_MD_ACCEPT(fd, addr, &al, timeout);	if (osfd == -1)		return 0;	fd2 = PR_AllocFileDesc(osfd, PR_GetTCPMethods());	if (!fd2) {		_PR_MD_CLOSE_SOCKET(osfd);		return NULL;	}	fd2->secret->nonblocking = fd->secret->nonblocking;	fd2->secret->inheritable = fd->secret->inheritable;#ifdef WINNT	PR_ASSERT(_PR_TRI_UNKNOWN != fd2->secret->inheritable);	if (!fd2->secret->nonblocking && !fd2->secret->inheritable) {		/*		 * The new socket has been associated with an I/O		 * completion port.  There is no going back.		 */		fd2->secret->md.io_model_committed = PR_TRUE;	}	PR_ASSERT(al == PR_NETADDR_SIZE(addr));	fd2->secret->md.accepted_socket = PR_TRUE;	memcpy(&fd2->secret->md.peer_addr, addr, al);#endif	/*	 * On some platforms, the new socket created by accept()	 * inherits the nonblocking (or overlapped io) attribute	 * of the listening socket.  As an optimization, these	 * platforms can skip the following _PR_MD_MAKE_NONBLOCK	 * call.	 * 	 * On Mac, we MUST make this call, because _PR_MD_MAKE_NONBLOCK	 * (which maps to _MD_makenonblock, see macsockotpt.c)	 * installs the async notifier routine needed to make blocking	 * I/O work properly.	 */#if !defined(SOLARIS) && !defined(IRIX) && !defined(WINNT)	_PR_MD_MAKE_NONBLOCK(fd2);#endif#ifdef _PR_INET6	if (addr && (AF_INET6 == addr->raw.family))        addr->raw.family = PR_AF_INET6;#endif	PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE);	PR_ASSERT(IsValidNetAddrLen(addr, al) == PR_TRUE);	return fd2;}