From: kn Date: Fri, 15 Dec 2023 10:28:57 +0000 (+0000) Subject: No interactive shell if -o is given X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=eb489a571f9bc5dfd0377167efc06f3e03a727ce;p=openbsd 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 --- 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