fs:oflag need consistent with psock
if don't consistent with psock,call fcntl will have differet flag Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
b110c984b1
commit
7ac2d3a5ac
|
@ -261,6 +261,11 @@ int socket(int domain, int type, int protocol)
|
||||||
oflags |= O_CLOEXEC;
|
oflags |= O_CLOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type & SOCK_NONBLOCK)
|
||||||
|
{
|
||||||
|
oflags |= O_NONBLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
psock = kmm_zalloc(sizeof(*psock));
|
psock = kmm_zalloc(sizeof(*psock));
|
||||||
if (psock == NULL)
|
if (psock == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue