int errno()
If the last call done on this port failed, this function will return an integer describing what went wrong. Refer to your unix manual for further information.