Skip to content

Conversation

@dilyanpalauzov
Copy link

@dilyanpalauzov dilyanpalauzov commented Nov 3, 2025

The file is already opened with O_RDWR | O_NOCTTY | O_NONBLOCK.

@dilyanpalauzov dilyanpalauzov force-pushed the rxtxport_open_pointless_assignments branch from eb76c8b to d003d07 Compare November 5, 2025 16:30
@dilyanpalauzov dilyanpalauzov changed the title SerialImp.c:RXTXPort(open): pointless assignments SerialImp.c:RXTXPort(open) - avoid noop fctnl() and pointless assignments Nov 5, 2025
dilyanpalauzov pushed a commit to dilyanpalauzov/nrjavaserial that referenced this pull request Nov 5, 2025
…ents

NeuronRobotics#261

The file is already opened with O_RDWR | O_NOCTTY | O_NONBLOCK.

* O_RDWR cannot be changed on linux with F_SETFL - https://man7.org/linux/man-pages/man2/F_GETFL.2const.html
* The last page lists explicitly what can be changed by F_SETFL and O_NOCTTY is not mentioned.
* O_NONBLOCK is already set when opening the file.
* FD_CLOEXEC is supposed to be set with F_SETFD - https://man7.org/linux/man-pages/man2/F_SETFD.2const.html
* Remove pointless assignments.
…ents

The file is already opened with O_RDWR | O_NOCTTY | O_NONBLOCK.

* O_RDWR cannot be changed on linux with F_SETFL - https://man7.org/linux/man-pages/man2/F_GETFL.2const.html
* The last page lists explicitly what can be changed by F_SETFL and O_NOCTTY is not mentioned.
* O_NONBLOCK is already set when opening the file
* FD_CLOEXEC is supposed to be set with F_SETFD - https://man7.org/linux/man-pages/man2/F_SETFD.2const.html

* remove pointless assignments
@dilyanpalauzov dilyanpalauzov force-pushed the rxtxport_open_pointless_assignments branch from d003d07 to 2dbd902 Compare November 7, 2025 11:04
@dilyanpalauzov dilyanpalauzov changed the title SerialImp.c:RXTXPort(open) - avoid noop fctnl() and pointless assignments SerialImp.c:RXTXPort(open) - avoid noop fcntl() and pointless assignments Nov 7, 2025
dilyanpalauzov pushed a commit to dilyanpalauzov/nrjavaserial that referenced this pull request Nov 7, 2025
…ents

NeuronRobotics#261

The file is already opened with O_RDWR | O_NOCTTY | O_NONBLOCK.

* O_RDWR cannot be changed on linux with F_SETFL - https://man7.org/linux/man-pages/man2/F_GETFL.2const.html
* The last page lists explicitly what can be changed by F_SETFL and O_NOCTTY is not mentioned.
* O_NONBLOCK is already set when opening the file.
* FD_CLOEXEC is supposed to be set with F_SETFD - https://man7.org/linux/man-pages/man2/F_SETFD.2const.html
* Remove pointless assignments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant