From eb489a571f9bc5dfd0377167efc06f3e03a727ce Mon Sep 17 00:00:00 2001 From: kn Date: Fri, 15 Dec 2023 10:28:57 +0000 Subject: [PATCH] No interactive shell if -o is given After r1.140 and r1.144 fixed -o '' and clenaed up option handling, respectively, avoid the "ftp> " shell if any output file was specified. OK millert --- usr.bin/ftp/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 2aecd5ad3ee..a104bdba03d 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.144 2023/12/12 22:00:43 kn Exp $ */ +/* $OpenBSD: main.c,v 1.145 2023/12/15 10:28:57 kn Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -627,7 +627,8 @@ main(volatile int argc, char *argv[]) } rval = auto_fetch(argc, argv, outfile); - if (rval >= 0 || pipeout) /* -1 == connected and cd-ed */ + /* -1 == connected and cd-ed */ + if (rval >= 0 || outfile != NULL) exit(rval); } else { #ifndef SMALL -- 2.20.1