diff options
author | Damien Miller <djm@mindrot.org> | 2003-01-10 11:40:00 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-01-10 11:40:00 +0100 |
commit | 956f3fb28b93420e87a51d1611029accebb2e43b (patch) | |
tree | d1f304e1bf833cef147bec2335b75187a93f9e98 /sftp.c | |
parent | - (djm) Enable new setproctitle emulation for Linux, AIX and HP/UX. More (diff) | |
download | openssh-956f3fb28b93420e87a51d1611029accebb2e43b.tar.xz openssh-956f3fb28b93420e87a51d1611029accebb2e43b.zip |
- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2003/01/08 23:53:26
[sftp.1 sftp.c sftp-int.c sftp-int.h]
Cleanup error handling for batchmode
Allow blank lines and comments in input
Ability to suppress abort on error in batchmode ("-put blah")
Fixes mindrot bug #452; markus@ ok
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.32 2002/11/27 17:53:35 markus Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.33 2003/01/08 23:53:26 djm Exp $"); /* XXX: short-form remote directory listings (like 'ls -C') */ @@ -108,7 +108,7 @@ usage(void) int main(int argc, char **argv) { - int in, out, ch; + int in, out, ch, err; pid_t sshpid; char *host, *userhost, *cp, *file2; int debug_level = 0, sshver = 2; @@ -237,7 +237,7 @@ main(int argc, char **argv) &sshpid); } - interactive_loop(in, out, file1, file2); + err = interactive_loop(in, out, file1, file2); #if !defined(USE_PIPES) shutdown(in, SHUT_RDWR); @@ -254,5 +254,5 @@ main(int argc, char **argv) fatal("Couldn't wait for ssh process: %s", strerror(errno)); - exit(0); + exit(err == 0 ? 0 : 1); } |