use select{} to block process