Use poll rather than select