Skip to content

Commit 8c89f15

Browse files
author
princewen
committed
Fix fcntl behavior after creating new socket
1 parent 18ee765 commit 8c89f15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

co_hook_sys_call.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,9 @@ int fcntl(int fildes, int cmd, ...)
672672
case F_GETFD:
673673
{
674674
ret = g_sys_fcntl_func( fildes,cmd );
675+
if (lp && !(lp->user_flag & O_NONBLOCK)) {
676+
ret = ret & (~O_NONBLOCK);
677+
}
675678
break;
676679
}
677680
case F_SETFD:

0 commit comments

Comments
 (0)