Closed tlbtlbtlb closed 4 years ago
There's no spnav_read
function in libspnav. Can you provide a minimal example program that reproduces the problem?
Since it's unclear what this issue refers to and how to reproduce it, I'm closing it as invalid. If you can produce a minimal compilable example that reproduces the problem, please post it here and I will re-open it.
In my application, I have a thread calling spnav_read in a loop. When quitting the application, I want to call spnav_close and have spnav_read return an error so the thread can terminate. But it continues blocking in the read system call. In Unix and Linux, you have to call shutdown from another thread to make read return (with an error.)
spnav_close should really call shutdown(fd, SHUT_RDWR) before calling close. In my app I work around it something like this:
See complete code