pthread_join and ctrl-D's in server and client seem to be working correctly