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:
anjiahao 2022-04-19 17:06:05 +08:00 committed by Petro Karashchenko
parent b110c984b1
commit 7ac2d3a5ac
1 changed files with 5 additions and 0 deletions

View File

@ -261,6 +261,11 @@ int socket(int domain, int type, int protocol)
oflags |= O_CLOEXEC;
}
if (type & SOCK_NONBLOCK)
{
oflags |= O_NONBLOCK;
}
psock = kmm_zalloc(sizeof(*psock));
if (psock == NULL)
{