socketpair: Add SOCK_NONBLOCK support into type field
behavior alignment to Linux Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
85ffa4bcf3
commit
2be529121a
1 changed files with 5 additions and 0 deletions
|
@ -150,6 +150,11 @@ int socketpair(int domain, int type, int protocol, int sv[2])
|
|||
oflags |= O_CLOEXEC;
|
||||
}
|
||||
|
||||
if (type & SOCK_NONBLOCK)
|
||||
{
|
||||
oflags |= O_NONBLOCK;
|
||||
}
|
||||
|
||||
/* Allocate a socket descriptor */
|
||||
|
||||
for (; j < 2; j++)
|
||||
|
|
Loading…
Reference in a new issue