From 1a1ef5ea293d5403ae323f18e278699dd3fe5974 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 11 Feb 2001 15:28:30 +0000 Subject: Return "No Mail" status on ^C. svn path=/trunk/; revision=3055 --- fetchmail.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fetchmail.c b/fetchmail.c index 69a137e5..3b06594d 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -832,7 +832,16 @@ int main(int argc, char **argv) successes ? PS_SUCCESS : querystatus); terminate_run(0); - exit(successes ? PS_SUCCESS : querystatus); + + if (successes) + exit(PS_SUCCESS); + else if (querystatus) + exit(querystatus); + else + /* in case we interrupted before a successful fetch */ + exit(PS_NOMAIL); + + exit(successes ? : querystatus); } static void list_merge(struct idlist **dstl, struct idlist **srcl, int force) -- cgit v1.2.3