diff options
author | Marco d'Itri <md@linux.it> | 2002-12-12 02:17:25 +0100 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2013-03-30 02:31:29 +0100 |
commit | d6bec26f44f139fa079230c5ee6c9baac8f0be96 (patch) | |
tree | 0abd5ac7b1633e0c3160629bba42f3d9ed2145d5 /whois.c | |
parent | fc83e15cf75106806ac98dc35ed57bdd9f6cf7ba (diff) | |
download | whois-d6bec26f44f139fa079230c5ee6c9baac8f0be96.tar.gz |
Imported Debian version 4.6.1v4.6.1
Diffstat (limited to 'whois.c')
-rw-r--r-- | whois.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -122,7 +122,7 @@ int main(int argc, char *argv[]) usage(); /* On some systems realloc only works on non-NULL buffers */ - qstring = malloc(1); + qstring = malloc(64); *qstring = '\0'; /* parse other parameters, if any */ @@ -212,6 +212,12 @@ int main(int argc, char *argv[]) strcat(p, "\r\n"); sockfd = openconn(server, port); + + /* + * Now we are connected and the query is supposed to complete quickly. + * This will help people who run whois ... | less + */ + alarm(0); do_query(sockfd, p); exit(0); |