Fixed a bug in res which caused the select() timer to be incorrectly
computed and making res child loop.