Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix: exceptions in Serial::SerialImpl::reconfigurePort makes opened file descriptor hang in system. #246

Open
detorto opened this issue Jul 2, 2021 · 0 comments

Comments

@detorto
Copy link

detorto commented Jul 2, 2021

If you try to create serial::Serial object, and something went wrong inreconfigurePortmethod (in my case - tcgetattr) - isOpened flag stays false, and ::close(_fd) method not called in destructor.
This makes opened descriptors hang, and in autodetection case, with full cycle over all available ports - exceeds the limits of opened fd's.

Probably, just need to remove if (is_open_ == true) condition in Serial::SerialImpl::close ()

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

No branches or pull requests

1 participant