Hi, Tony,
Regarding your application, I suppose that you use PC to communicate with TWR-KL43Z via RS232 instead of using USB port which is treated as virtual com, is it correct?
If you use RS232 port, as you know that the TWR-Kl43 does not has RS232 port, in the case, you have to establish a tower system with TWR-KL43Z, TWR-SER which has RS232 port and Primary/Secondary elevator board, you can connect the RS232 port of PC to RS232 port on TWR-SER board. Furthermore, you have to set the jumper correctly and power supply correctly, on the TWR-KL43Z, you have to close pin1&2 for J5, close pin1&2 for J3, while you have use UART2 module(PTE23 and PTE22) for KL43Z. For the TWR-SER board, you have to close pin1&2 for J17 and J19.
Regarding your code run in PC with Linux OS, it sounds good that you create a thread which monitors the RS232 port, while you press Ctrl+C, signal_hdlr() is run, which close all the thread and current progress. But I am not very familiar with Linux and struct termios, do you means that your code can run the virtual USB Com instead of RS232?
If it is not your scenario, I am sorry, pls tell me the hardware connection.
BR
Xiangjun Rong