part way through getting polling working on linux