I have a script that does a whois lookup that worked fine on a previous server. It used whois with the t option to timeout in 5 seconds. A while back I upgraded to a new server and the script had problems. I found out the new server didn't even have whois. The whois command was symlinked to jwhois so I had to modify the script to adjust for the differences. I found out that jwhois has no timeout option. That wasn't a problem for a while, but then one day I noticed my script was just waiting, and waiting, and waiting. It was stuck on a jwhois query that wasn't responding.
I got another server last month and it has whois, but must be a newer version because it no longer has the t option.
How do I set a timeout for jwhois?