You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/16 07:21:38 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1800: fs/vfs/fs_ioctl.c: Add FIOCLEX/FIONCLEX support

xiaoxiang781216 commented on a change in pull request #1800:
URL: https://github.com/apache/incubator-nuttx/pull/1800#discussion_r489217788



##########
File path: fs/vfs/fs_ioctl.c
##########
@@ -194,6 +194,12 @@ int nx_vioctl(int fd, int req, va_list ap)
                                nx_fcntl(fd, F_GETFL) & ~O_NONBLOCK);
               }
             break;
+          case FIOCLEX:
+            ret = nx_fcntl(fd, F_SETFD, FD_CLOEXEC);

Review comment:
       should we call F_GETFL and then or with FD_CLOEXEC? to avoid clear other flag we will add in the future.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org