Add OS API wrapper for pselect