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

Added close serial port to device_destruct in unix serial.cc #71

Merged
merged 2 commits into from
Apr 18, 2017

Conversation

kent-williams
Copy link
Contributor

Serial device was not being properly closed on unix systems. This is ok on windows.

@daniel-j-h
Copy link
Collaborator

Urgh. Good catch! Can you add an assertion like this one:

if (close(fd) == -1) {
SWEEP_ASSERT(false && "closing file descriptor during error handling failed");
}

as not being able to close the serial device will corrupt state - which will lead to the problem you saw here. Then this is ready to go in. Thank you Kent.

@daniel-j-h daniel-j-h added the Bug label Apr 18, 2017
@daniel-j-h
Copy link
Collaborator

Also this is related to #69, no? If so feel free to merge and close the issue.

@kent-williams kent-williams merged commit ffcc184 into master Apr 18, 2017
@kent-williams kent-williams deleted the serial-close branch April 18, 2017 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants