From 1c39f73cc4b8555cd44808e1ee83bbc23b67ead6 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 13 Apr 1997 20:22:39 +0000 Subject: [PATCH] do not (continue) on a stdin pipe --- usr.bin/mail/collect.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c index 4ae264dead1..e4dd7c5fd4f 100644 --- a/usr.bin/mail/collect.c +++ b/usr.bin/mail/collect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: collect.c,v 1.3 1997/04/10 15:33:50 deraadt Exp $ */ +/* $OpenBSD: collect.c,v 1.4 1997/04/13 20:22:39 deraadt Exp $ */ /* $NetBSD: collect.c,v 1.6 1996/06/08 19:48:16 christos 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.3 1997/04/10 15:33:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: collect.c,v 1.4 1997/04/13 20:22:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -156,8 +156,10 @@ cont: fprintf(stderr, "\n(Interrupt -- one more to kill letter)\n"); } else { - printf("(continue)\n"); - fflush(stdout); + if (isatty(0)) { + printf("(continue)\n"); + fflush(stdout); + } } } for (;;) { -- 2.20.1