summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sftp.c b/sftp.c
index c173e58cb..d62e9e42c 100644
--- a/sftp.c
+++ b/sftp.c
@@ -24,7 +24,7 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27RCSID("$OpenBSD: sftp.c,v 1.32 2002/11/27 17:53:35 markus Exp $"); 27RCSID("$OpenBSD: sftp.c,v 1.33 2003/01/08 23:53:26 djm Exp $");
28 28
29/* XXX: short-form remote directory listings (like 'ls -C') */ 29/* XXX: short-form remote directory listings (like 'ls -C') */
30 30
@@ -108,7 +108,7 @@ usage(void)
108int 108int
109main(int argc, char **argv) 109main(int argc, char **argv)
110{ 110{
111 int in, out, ch; 111 int in, out, ch, err;
112 pid_t sshpid; 112 pid_t sshpid;
113 char *host, *userhost, *cp, *file2; 113 char *host, *userhost, *cp, *file2;
114 int debug_level = 0, sshver = 2; 114 int debug_level = 0, sshver = 2;
@@ -237,7 +237,7 @@ main(int argc, char **argv)
237 &sshpid); 237 &sshpid);
238 } 238 }
239 239
240 interactive_loop(in, out, file1, file2); 240 err = interactive_loop(in, out, file1, file2);
241 241
242#if !defined(USE_PIPES) 242#if !defined(USE_PIPES)
243 shutdown(in, SHUT_RDWR); 243 shutdown(in, SHUT_RDWR);
@@ -254,5 +254,5 @@ main(int argc, char **argv)
254 fatal("Couldn't wait for ssh process: %s", 254 fatal("Couldn't wait for ssh process: %s",
255 strerror(errno)); 255 strerror(errno));
256 256
257 exit(0); 257 exit(err == 0 ? 0 : 1);
258} 258}