Bugzilla – Attachment 1352 Details for
Bug 1365
sftp exits immediately after connection (fgets EAGAIN)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.6p1 (but should work for 4.7p1 too)
openssh_sftp_fgets_EAGAIN.patch (text/plain), 934 bytes, created by
Roberto A. Foglietta
on 2007-09-18 22:27:22 AEST
(
hide
)
Description:
patch for 4.6p1 (but should work for 4.7p1 too)
Filename:
MIME Type:
Creator:
Roberto A. Foglietta
Created:
2007-09-18 22:27:22 AEST
Size:
934 bytes
patch
obsolete
>diff -pruBb openssh-4.6p1/sftp.c openssh-4.6p1_raf/sftp.c >--- openssh-4.6p1/sftp.c 2007-01-05 06:30:41.000000000 +0100 >+++ openssh-4.6p1_raf/sftp.c 2007-09-18 13:56:54.793079785 +0200 >@@ -1260,7 +1260,7 @@ interactive_loop(int fd_in, int fd_out, > char *dir = NULL; > char cmd[2048]; > struct sftp_conn *conn; >- int err, interactive; >+ int err, interactive, prt=1; > EditLine *el = NULL; > #ifdef USE_LIBEDIT > History *hl = NULL; >@@ -1336,13 +1336,19 @@ interactive_loop(int fd_in, int fd_out, > signal(SIGINT, SIG_IGN); > > if (el == NULL) { >- if (interactive) >+ if (interactive && prt) > printf("sftp> "); > if (fgets(cmd, sizeof(cmd), infile) == NULL) { >+ if (errno == EAGAIN) { >+ prt = 0; >+ usleep(10*1000); >+ continue; >+ } > if (interactive) > printf("\n"); > break; > } >+ prt = 1; > if (!interactive) { /* Echo command */ > printf("sftp> %s", cmd); > if (strlen(cmd) > 0 &&
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1365
: 1352 |
1353
|
1354