Skip to content

Commit

Permalink
Fix fcntl behavior after creating new socket
Browse files Browse the repository at this point in the history
  • Loading branch information
princewen committed Oct 21, 2019
1 parent 18ee765 commit 8c89f15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions co_hook_sys_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ int fcntl(int fildes, int cmd, ...)
case F_GETFD:
{
ret = g_sys_fcntl_func( fildes,cmd );
if (lp && !(lp->user_flag & O_NONBLOCK)) {
ret = ret & (~O_NONBLOCK);
}
break;
}
case F_SETFD:
Expand Down

0 comments on commit 8c89f15

Please sign in to comment.