version 1.154, 2016/12/28 17:48:04 |
version 1.155, 2017/01/03 17:00:04 |
|
|
return (epath); |
return (epath); |
} |
} |
|
|
|
/* ARGSUSED */ |
|
static void |
|
tooslow(int signo) |
|
{ |
|
dprintf(STDERR_FILENO, "%s: connect taking too long\n", __progname); |
|
_exit(2); |
|
} |
|
|
/* |
/* |
* Retrieve URL, via the proxy in $proxyvar if necessary. |
* Retrieve URL, via the proxy in $proxyvar if necessary. |
* Modifies the string argument given. |
* Modifies the string argument given. |
|
|
} |
} |
#endif /* !SMALL */ |
#endif /* !SMALL */ |
|
|
|
if (connect_timeout) { |
|
(void)signal(SIGALRM, tooslow); |
|
alarmtimer(connect_timeout); |
|
} |
|
|
for (error = connect(s, res->ai_addr, res->ai_addrlen); |
for (error = connect(s, res->ai_addr, res->ai_addrlen); |
error != 0 && errno == EINTR; error = connect_wait(s)) |
error != 0 && errno == EINTR; error = connect_wait(s)) |
continue; |
continue; |
|
|
#else /* !NOSSL */ |
#else /* !NOSSL */ |
fin = fdopen(s, "r+"); |
fin = fdopen(s, "r+"); |
#endif /* !NOSSL */ |
#endif /* !NOSSL */ |
|
|
|
if (connect_timeout) { |
|
signal(SIGALRM, SIG_DFL); |
|
alarmtimer(0); |
|
} |
|
|
/* |
/* |
* Construct and send the request. Proxy requests don't want leading /. |
* Construct and send the request. Proxy requests don't want leading /. |