Are the file descriptors for both stdins the same? Since you have two
threads it is possible that the "main" thread gets to stdin before the
other thread (especially since you mentioned that ncurses was not thread
safe). Or, if your serial protocol is simple enough you could make the
program single threaded and multiplex the i/o using poll. BTW, I am not
familiar with curses, so these are simply guesses.
Missaka Wijekoon (a.k.a. Misk) XXXX@XXXXX.COM
Sr. Software Engineer http://www.yqcomputer.com/