fs/vfs/fs_ioctl.c: Call F_GETFD to avoid clear other flag we will add in the future
This commit is contained in:
parent
d4ec1ababd
commit
5eefe8609c
@ -195,10 +195,10 @@ int nx_vioctl(int fd, int req, va_list ap)
|
||||
}
|
||||
break;
|
||||
case FIOCLEX:
|
||||
ret = nx_fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
ret = nx_fcntl(fd, F_SETFD, nx_fcntl(fd, F_GETFD) | FD_CLOEXEC);
|
||||
break;
|
||||
case FIONCLEX:
|
||||
ret = nx_fcntl(fd, F_SETFD, 0);
|
||||
ret = nx_fcntl(fd, F_SETFD, nx_fcntl(fd, F_GETFD) & ~FD_CLOEXEC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user