summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-26 20:04:45 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-26 20:04:45 +0000
commit10b9bf95c07c0fb81f46b2df0e09afd7d3d1847b (patch)
tree30a0ef174dfae141420e529fb0220125666d65a4 /sftp.c
parentbb7c97620278ae97f52bbd50948734b6b355bcc2 (diff)
- (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen
<vinschen@redhat.com>
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sftp.c b/sftp.c
index b4775c02f..0fba6749f 100644
--- a/sftp.c
+++ b/sftp.c
@@ -246,11 +246,18 @@ main(int argc, char **argv)
246 246
247 interactive_loop(in, out); 247 interactive_loop(in, out);
248 248
249#if !defined(USE_PIPES)
250 shutdown(in, SHUT_RDWR);
251 shutdown(out, SHUT_RDWR);
252#endif
253
249 close(in); 254 close(in);
250 close(out); 255 close(out);
251 256
257#if !defined(HAVE_CYGWIN)
252 if (kill(sshpid, SIGHUP) == -1) 258 if (kill(sshpid, SIGHUP) == -1)
253 fatal("Couldn't terminate ssh process: %s", strerror(errno)); 259 fatal("Couldn't terminate ssh process: %s", strerror(errno));
260#endif
254 261
255 if (waitpid(sshpid, NULL, 0) == -1) 262 if (waitpid(sshpid, NULL, 0) == -1)
256 fatal("Couldn't wait for ssh process: %s", strerror(errno)); 263 fatal("Couldn't wait for ssh process: %s", strerror(errno));