Donny9 commented on code in PR #16536:
URL: https://github.com/apache/nuttx/pull/16536#discussion_r2147015701
##########
fs/vfs/fs_fcntl.c:
##########
@@ -350,11 +350,11 @@ int fcntl(int fd, int cmd, ...)
if (oflags & FD_CLOEXEC)
{
- ret = file_ioctl(filep, FIOCLEX, NULL);
+ ret = ioctl(fd, FIOCLEX, NULL);
}
else
{
- ret = file_ioctl(filep, FIONCLEX, NULL);
+ ret = ioctl(fd, FIONCLEX, NULL);
Review Comment:
Done~
##########
fs/shm/shm_open.c:
##########
@@ -176,7 +176,7 @@ int shm_open(FAR const char *name, int oflag, mode_t mode)
int ret;
int fd;
- fd = file_allocate(oflag, 0, &shm);
+ fd = file_allocate(oflag | O_CLOEXEC, 0, &shm);
Review Comment:
follow
https://man7.org/linux/man-pages/man3/shm_open.3.html#:~:text=The%20FD_CLOEXEC%20flag%20(see%0A%20%20%20%20%20%20%20fcntl(2))%20is%20set%20for%20the%20file%20descriptor
--
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]