I have a stream that continuously reads a serial port for data. If the main program receives SIGINT, it calls g_thread_join () on the serial port stream.
However, since reading blocks the serial port stream, it will not return and run the program until I receive bytes on the serial line, and then it can exit.
Is there a way to pass SIGINT on for reading () so that it can be forcibly returned when the main thread requires it?
source
share