]> andersk Git - gssapi-openssh.git/blobdiff - openssh/sftp-int.c
Import of OpenSSH 3.2.2p1
[gssapi-openssh.git] / openssh / sftp-int.c
index 5de93891a70dd19ec88a5bef4df78f24b224a301..5b1d3848e82895e96c4ff91ce28be7c8366eca2f 100644 (file)
@@ -26,7 +26,7 @@
 /* XXX: recursive operations */
 
 #include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.44 2002/02/13 00:59:23 djm Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.46 2002/03/30 18:51:15 markus Exp $");
 
 #include "buffer.h"
 #include "xmalloc.h"
@@ -176,8 +176,9 @@ local_do_shell(const char *args)
                    strerror(errno));
                _exit(1);
        }
-       if (waitpid(pid, &status, 0) == -1)
-               fatal("Couldn't wait for child: %s", strerror(errno));
+       while (waitpid(pid, &status, 0) == -1)
+               if (errno != EINTR)
+                       fatal("Couldn't wait for child: %s", strerror(errno));
        if (!WIFEXITED(status))
                error("Shell exited abormally");
        else if (WEXITSTATUS(status))
@@ -886,8 +887,10 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
                                    file2);
 
                        parse_dispatch_command(conn, cmd, &pwd);
+                       xfree(dir);
                        return;
                }
+               xfree(dir);
        }
 #if HAVE_SETVBUF
        setvbuf(stdout, NULL, _IOLBF, 0);
This page took 3.592363 seconds and 4 git commands to generate.