I'm working on a program that is causing an alignment exception when I try to use std::thread. After switching to pthread, I also realized that when the threads were running, any input from the keyboard was ignored. This obviously causes problems when the program tries to run away from me and I can no longer send SIGINT with ctrl-c. I'm really stuck on this one. I've tried a few different signal handlers sigset() and signal(). Nothing will kill the program except turning the Pi off.
Another weird issue. I'm using wiringPi to try to read some input from some buttons, but I'm not getting the values correctly. digitalRead() returns 1 or 0 regardless of whether or not I press the button, and I did use pinMode() to set the pins to input.
I've spent way too much time trying to fix this. I'm feeling desperate.
The mistake was actually that I was using the wrong pin diagram. Apparently setting a pin to input when it's being used for other things causes the Pi to start ignoring keyboard input. I have no idea why.