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

Serial Port Exception #276

Open
manandogar opened this issue Nov 16, 2022 · 2 comments
Open

Serial Port Exception #276

manandogar opened this issue Nov 16, 2022 · 2 comments

Comments

@manandogar
Copy link

Serial::SerialImpl::close ()
{
if (is_open_ == true) {
if (fd_ != INVALID_HANDLE_VALUE) {
int ret;
ret = CloseHandle(fd_);
if (ret == 0) {
stringstream ss;
ss << "Error while closing serial port: " << GetLastError();
THROW (IOException, ss.str().c_str());
} else {
fd_ = INVALID_HANDLE_VALUE;
}
}
is_open_ = false;
}
}
Untitled000

@nagayev
Copy link

nagayev commented Aug 31, 2023

@manandogar Please provide full code sample.

@ChenYB1314
Copy link

This problem I also encountered, after repeatedly unplugging the serial port, close the software will appear zombie process.Analyzing the stack information via a dmp file, the problem occurs in CloseHandle. Excuse me, is there a solution?

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

3 participants