]> andersk Git - openssh.git/blobdiff - sftp.c
- (djm) OpenBSD CVS Sync
[openssh.git] / sftp.c
diff --git a/sftp.c b/sftp.c
index c173e58cb6b12ae40abc03d516a204b3495fa3cf..d62e9e42c80b25de4bc7d46845f0d8a7180a2f93 100644 (file)
--- a/sftp.c
+++ b/sftp.c
@@ -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);
 }
This page took 0.147616 seconds and 4 git commands to generate.