Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
serial readline thread IO Error (9, 'Bad file descriptor')
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="nik, post: 2937100"] Hi, How can I close a thread that is waiting on a file/port down gracefully, and not have an IO error pop up? I am having trouble closing a thread that is listening to the serial port. I have a thread that calls uses a pySerial serial port and calls readline() without a timeout, which is blocking. When I am shutting down the application I close the serial port, which causes the IO error: (9, 'Bad file descriptor'). It makes sense that we would get this error, because it is trying to read off of a closed 'file'. Is there a better way to close this thread and port down? Thanks, Nik [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
serial readline thread IO Error (9, 'Bad file descriptor')
Top