diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-11 15:28:30 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-11 15:28:30 +0000 |
commit | 1a1ef5ea293d5403ae323f18e278699dd3fe5974 (patch) | |
tree | 833b811c7672daeabd8a5bbd7c4b665e54c69a2c /fetchmail.c | |
parent | a29a9d0a718d9a2e11803596326d14f64042a555 (diff) | |
download | fetchmail-1a1ef5ea293d5403ae323f18e278699dd3fe5974.tar.gz fetchmail-1a1ef5ea293d5403ae323f18e278699dd3fe5974.tar.bz2 fetchmail-1a1ef5ea293d5403ae323f18e278699dd3fe5974.zip |
Return "No Mail" status on ^C.
svn path=/trunk/; revision=3055
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 11 |
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) |