Bugzilla – Attachment 3511 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]
clientloop related patch
clientloop.c.85.patch (text/plain), 1.31 KB, created by
sanumesh
on 2021-05-06 05:33:51 AEST
(
hide
)
Description:
clientloop related patch
Filename:
MIME Type:
Creator:
sanumesh
Created:
2021-05-06 05:33:51 AEST
Size:
1.31 KB
patch
obsolete
>--- clientloop.c 2021-03-02 04:31:47.000000000 -0600 >+++ clientloop.c.new 2021-03-31 21:10:39.563518860 -0500 >@@ -128,6 +128,15 @@ extern int fork_after_authentication_fla > extern int muxserver_sock; /* XXX use mux_client_cleanup() instead */ > > /* >+ * Flag indicating that the current process should be backgrounded and >+ * a new slave launched in the foreground for ControlPersist. >+ */ >+extern int need_controlpersist_detach; >+ >+/* For keeping fd of the original stdout until close */ >+extern int isolated_stdout_fd; >+ >+/* > * Name of the host we are connecting to. This is the name given on the > * command line, or the Hostname specified for the user-supplied name in a > * configuration file. >@@ -1403,6 +1412,13 @@ client_loop(struct ssh *ssh, int have_pt > if (have_pty) > leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE); > >+ /* restore stdin if stdout was isolated */ >+ if (!need_controlpersist_detach && isolated_stdout_fd > 0){ >+ if (dup2(isolated_stdout_fd, fileno(stdout)) < 0) >+ fatal("%s: dup2() isolated stdout failed", __func__); >+ close(isolated_stdout_fd); >+ } >+ > /* restore blocking io */ > if (!isatty(fileno(stdin))) > unset_nonblock(fileno(stdin));
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