adding signal handling. Only tested with multi-threaded servers and clients, and TCP. Currently reports an error for the synchronous sockets as the only way to abort
from an accept call is to call shutdown on the socket descriptor. Now have a single global variable so we can access the file descriptor.