aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-12-16 22:49:49 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-12-16 22:49:49 +0000
commit40107e575d94a69bc1584a1b41782996ee495493 (patch)
treeddb3af50cb35ca97a61d02b679509417c184d883 /fetchmail.c
parent59ca28c6d7942f2c0ee3874954f95d8fed6259e2 (diff)
downloadfetchmail-40107e575d94a69bc1584a1b41782996ee495493.tar.gz
fetchmail-40107e575d94a69bc1584a1b41782996ee495493.tar.bz2
fetchmail-40107e575d94a69bc1584a1b41782996ee495493.zip
Document a couple common misconfigurations.
svn path=/trunk/; revision=630
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 3dece2be..882c7e44 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -628,13 +628,23 @@ void termhook(int sig)
{
struct query *ctl;
+ /*
+ * Sending SMTP QUIT on signal is theoretically nice, but led to a
+ * subtle bug. If fetchmail was terminated by signal while it was
+ * shipping message text, it would hang forever waiting for a
+ * command acknowledge. In theory we could disable the QUIT
+ * only outside of the message send. In practice, we don't
+ * care. All mailservers hang up on a dropped TCP/IP connection
+ * anyway.
+ */
+
if (sig != 0)
fprintf(stderr, "terminated with signal %d\n", sig);
-
- /* terminate all SMTP connections cleanly */
- for (ctl = querylist; ctl; ctl = ctl->next)
- if (ctl->lead_smtp == ctl && ctl->smtp_sockfp != (FILE *)NULL)
- SMTP_quit(ctl->smtp_sockfp);
+ else
+ /* terminate all SMTP connections cleanly */
+ for (ctl = querylist; ctl; ctl = ctl->next)
+ if (ctl->lead_smtp == ctl && ctl->smtp_sockfp != (FILE *)NULL)
+ SMTP_quit(ctl->smtp_sockfp);
if (!check_only)
write_saved_lists(querylist, idfile);