aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-11 15:28:30 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-11 15:28:30 +0000
commit1a1ef5ea293d5403ae323f18e278699dd3fe5974 (patch)
tree833b811c7672daeabd8a5bbd7c4b665e54c69a2c
parenta29a9d0a718d9a2e11803596326d14f64042a555 (diff)
downloadfetchmail-1a1ef5ea293d5403ae323f18e278699dd3fe5974.tar.gz
fetchmail-1a1ef5ea293d5403ae323f18e278699dd3fe5974.tar.bz2
fetchmail-1a1ef5ea293d5403ae323f18e278699dd3fe5974.zip
Return "No Mail" status on ^C.
svn path=/trunk/; revision=3055
-rw-r--r--fetchmail.c11
1 files changed, 10 insertions, 1 deletions
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)