xiaoxiang781216 commented on code in PR #11857:
URL: https://github.com/apache/nuttx/pull/11857#discussion_r1517076764
##########
drivers/pipes/pipe.c:
##########
@@ -305,9 +303,9 @@ int pipe2(int fd[2], int flags)
/* Clear O_NONBLOCK if it was set previously */
- if ((flags & O_NONBLOCK) == 0)
+ if (!nonblock)
{
- ret = fcntl(fd[1], F_SETFL, flags & (~O_NONBLOCK));
+ ret = ioctl(fd[1], FIONBIO, &nonblock);
Review Comment:
there are many place to check O_NONBLOCK in this function, do you want all
place changing to `flags & O_NONBLOCK`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]