diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-22 18:26:25 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-22 18:26:25 +0000 |
commit | 51b2752e6430295a6a39bbd6b7001e887df471cf (patch) | |
tree | f6fc95d4a76645abd87c063c7b7c39b5f23e8cc2 | |
parent | f3add509318ef4b1a954a0e76c9eb2cb4e16b6a5 (diff) |
Only require 2 ^C's at Subject: prompt to quit as it is supposed to.
Also in Subject: prompt, when we get that first ^C re-prompt for
the Subject: like SunOS does so the user knows what is going on.
-rw-r--r-- | usr.bin/mail/collect.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c index 64e7d73861b..3c79a49ca1f 100644 --- a/usr.bin/mail/collect.c +++ b/usr.bin/mail/collect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: collect.c,v 1.9 1997/07/14 15:56:23 millert Exp $ */ +/* $OpenBSD: collect.c,v 1.10 1997/07/22 18:26:24 millert Exp $ */ /* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)collect.c 8.2 (Berkeley) 4/19/94"; #else -static char rcsid[] = "$OpenBSD: collect.c,v 1.9 1997/07/14 15:56:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: collect.c,v 1.10 1997/07/22 18:26:24 millert Exp $"; #endif #endif /* not lint */ @@ -152,8 +152,16 @@ collect(hp, printheaders) longline = 0; if (!sigsetjmp(colljmp, 1)) { - if (getsub) - grabh(hp, GSUBJECT); + if (getsub && grabh(hp, GSUBJECT) == SIGINT) { + fflush(stdout); + fputs("\n(Interrupt -- one more to kill letter)\n", + stderr); + if (grabh(hp, GSUBJECT) == SIGINT) { + hadintr++; + collint(SIGINT); + exit(1); + } + } } else { /* * Come here for printing the after-signal message. |