aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-11-21 20:39:57 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-11-21 20:39:57 +0000
commit5d886c3c99aa8db3723f7e5e55411a212ef57a23 (patch)
tree5b96df4ace2a29215dffcdc46b17cdf2089507a4
parente6ebb20b2bf2e28d52fa4c14abd8d3beff4c5826 (diff)
downloadfetchmail-5d886c3c99aa8db3723f7e5e55411a212ef57a23.tar.gz
fetchmail-5d886c3c99aa8db3723f7e5e55411a212ef57a23.tar.bz2
fetchmail-5d886c3c99aa8db3723f7e5e55411a212ef57a23.zip
Better initialization error message.
svn path=/trunk/; revision=567
-rw-r--r--fetchmail.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fetchmail.c b/fetchmail.c
index ebb2b899..49355f5c 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -325,10 +325,14 @@ int main (int argc, char **argv)
struct hostent *namerec;
/* compute the canonical name of the host */
+ errno = 0;
namerec = gethostbyname(ctl->servername);
if (namerec == (struct hostent *)NULL)
{
- fprintf(stderr,
+ if (errno)
+ perror("fetchmail: initialization error");
+ else
+ fprintf(stderr,
"fetchmail: skipping %s poll, nameserver isn't responding\n",
ctl->servername);
continue;