Tested on pi. Input works but thread does not terminate correctly.