Bugzilla – Attachment 3510 Details for
Bug 3280
stdout resource unavailable error when used with a pipe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ssh related patch
ssh.c.85.patch (text/plain), 1.31 KB, created by
sanumesh
on 2021-05-06 05:32:00 AEST
(
hide
)
Description:
ssh related patch
Filename:
MIME Type:
Creator:
sanumesh
Created:
2021-05-06 05:32:00 AEST
Size:
1.31 KB
patch
obsolete
>--- ssh.c 2021-03-31 11:47:11.791168318 -0500 >+++ ssh.c.new 2021-03-31 21:04:42.803507584 -0500 >@@ -144,6 +144,9 @@ int need_controlpersist_detach = 0; > /* Copies of flags for ControlPersist foreground mux-client */ > int ostdin_null_flag, ono_shell_flag, otty_flag, orequest_tty; > >+/* For keeping fd of the original stdin until close */ >+int isolated_stdout_fd = 0; >+ > /* > * Flag indicating that ssh should fork after authentication. This is useful > * so that the passphrase can be entered manually, and then ssh goes to the >@@ -2185,8 +2188,14 @@ ssh_session2(struct ssh *ssh, const stru > * NB. this can only happen after LocalCommand has completed, > * as it may want to write to stdout. > */ >- if (!need_controlpersist_detach && stdfd_devnull(0, 1, 0) == -1) >- error_f("stdfd_devnull failed"); >+ if (!need_controlpersist_detach){ >+ /* isolate the original stdout fd */ >+ isolated_stdout_fd = dup(STDOUT_FILENO); >+ if (isolated_stdout_fd < 0) >+ fatal("%s: dup() stdout failed", __func__); >+ if(stdfd_devnull(0, 1, 0) == -1) >+ error_f("stdfd_devnull failed"); >+ } > > /* > * If requested and we are not interested in replies to remote
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 3280
:
3510
|
3511
|
3519