Partial: Handle interruptions to various select calls in util.c

Conflicts:
	util.c
	util.h
Check for when errno is set on windows as well as the windows variant for errors.

Conflicts:
	util.h