Capture error output of pthread_join.

pthread_join() does not store an error condition in
errno. Instead, it returns it as the non-zero value
in the return code.
Prevent UART threads from handling signals.

On FreeBSD, UART1's thread was consistently catching the
SIGINT and causing the shutdown process to occur. This caused
the pthread_join() to fail on that thread with a "deadlock avoided"
error. So, just prevent these threads from handling signals
and force the main thread to do so.