Add a timeout to the select() call. Patch by Sam Gerstein <sgerstein bluefinlab