pkarashchenko commented on code in PR #11857:
URL: https://github.com/apache/nuttx/pull/11857#discussion_r1517082257
##########
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:
yes, but in `file_pipe` and `pipe2` we can get rid of `nonblock` auto
variable and just reuse `ret = 1;`.
--
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]