diff --git a/ssh_keygen/scp.c b/ssh_keygen/scp.c index 885699e5..3e287c9f 100644 --- a/ssh_keygen/scp.c +++ b/ssh_keygen/scp.c @@ -613,7 +613,7 @@ scp_main(int argc, char **argv) (void) close(remin); if (remout != -1) (void) close(remout); -#if !TARGET_OS_IPHONE +//#if !TARGET_OS_IPHONE // Experimental: don't wait for ssh to finish because ssh waits for scp to finish. if (waitpid(do_cmd_pid, &status, 0) == -1) errs = 1; @@ -621,7 +621,7 @@ scp_main(int argc, char **argv) if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) errs = 1; } -#endif +//#endif } exit(errs != 0); } diff --git a/ssh_keygen/sftp.c b/ssh_keygen/sftp.c index 60dca34e..b4504379 100644 --- a/ssh_keygen/sftp.c +++ b/ssh_keygen/sftp.c @@ -2229,6 +2229,10 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) setvbuf(infile, NULL, _IOLBF, 0); interactive = !batchmode && isatty(STDIN_FILENO); +#if TARGET_OS_IPHONE + if (interactive) + ios_stopInteractive(); +#endif err = 0; for (;;) { @@ -2600,10 +2604,6 @@ sftp_main(int argc, char **argv) } -#if TARGET_OS_IPHONE - ios_stopInteractive(); -#endif - err = interactive_loop(conn, file1, file2); #if !defined(USE_PIPES) @@ -2617,11 +2617,11 @@ sftp_main(int argc, char **argv) fclose(infile); // ssh waits for sftp in ios_system::cleanup_function, so this ends in an infinite loop -#if !TARGET_OS_IPHONE +//#if !TARGET_OS_IPHONE while (waitpid(sshpid, NULL, 0) == -1 && sshpid > 1) if (errno != EINTR) fatal("Couldn't wait for ssh process: %s", strerror(errno)); -#endif +//#endif exit(err == 0 ? 0 : 1); } diff --git a/ssh_keygen/ssh.c b/ssh_keygen/ssh.c index 885bae41..12df45bf 100644 --- a/ssh_keygen/ssh.c +++ b/ssh_keygen/ssh.c @@ -1716,11 +1716,6 @@ ssh_main(int ac, char **av) /* Kill ProxyCommand if it is running. */ ssh_kill_proxy_command(); -#if TARGET_OS_IPHONE - if (fileno(thread_stdout) != fileno(thread_stderr)) - fclose(thread_stderr); - fclose(thread_stdout); -#endif return exit_status; }