Fix usage of Popen().poll() and settimeout_raw