From 5d886c3c99aa8db3723f7e5e55411a212ef57a23 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 21 Nov 1996 20:39:57 +0000 Subject: Better initialization error message. svn path=/trunk/; revision=567 --- fetchmail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3