From 51b2752e6430295a6a39bbd6b7001e887df471cf Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 22 Jul 1997 18:26:25 +0000 Subject: 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. --- usr.bin/mail/collect.c | 16 ++++++++++++---- 1 file 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. -- cgit v1.2.3