return(-1);
}
-/* FIX ... the alarm clock is a problem for multithreaded programs because all
- * threads receive the signal.
- signal(SIGALRM, timeout);
- alarm(30);
- */
-
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
lprintf(3, "can't connect to %s.%s: %s\n",
host, service, strerror(errno));
return(-1);
}
-/*
- alarm(0);
- signal(SIGALRM, SIG_IGN);
- */
return (s);
}
/* Strip any trailing CR and LF characters.
*/
+ buf[i] = 0;
while ( (strlen(buf)>0)
&& ((buf[strlen(buf)-1]==13)
|| (buf[strlen(buf)-1]==10)) ) {