fix popen polling