|
Line
Link Here
|
| 0 |
-- ssh.c 2021-03-31 11:47:11.791168318 -0500 |
0 |
++ ssh.c.new 2021-03-31 21:04:42.803507584 -0500 |
|
Lines 144-149
int need_controlpersist_detach = 0;
Link Here
|
| 144 |
/* Copies of flags for ControlPersist foreground mux-client */ |
144 |
/* Copies of flags for ControlPersist foreground mux-client */ |
| 145 |
int ostdin_null_flag, ono_shell_flag, otty_flag, orequest_tty; |
145 |
int ostdin_null_flag, ono_shell_flag, otty_flag, orequest_tty; |
|
|
146 |
/* For keeping fd of the original stdin until close */ |
| 147 |
int isolated_stdout_fd = 0; |
| 148 |
|
| 146 |
/* |
149 |
/* |
| 147 |
* Flag indicating that ssh should fork after authentication. This is useful |
150 |
* Flag indicating that ssh should fork after authentication. This is useful |
| 148 |
* so that the passphrase can be entered manually, and then ssh goes to the |
151 |
* so that the passphrase can be entered manually, and then ssh goes to the |
|
Lines 2185-2192
ssh_session2(struct ssh *ssh, const stru
Link Here
|
| 2185 |
* NB. this can only happen after LocalCommand has completed, |
2188 |
* NB. this can only happen after LocalCommand has completed, |
| 2186 |
* as it may want to write to stdout. |
2189 |
* as it may want to write to stdout. |
| 2187 |
*/ |
2190 |
*/ |
| 2188 |
if (!need_controlpersist_detach && stdfd_devnull(0, 1, 0) == -1) |
2191 |
if (!need_controlpersist_detach){ |
| 2189 |
error_f("stdfd_devnull failed"); |
2192 |
/* isolate the original stdout fd */ |
|
|
2193 |
isolated_stdout_fd = dup(STDOUT_FILENO); |
| 2194 |
if (isolated_stdout_fd < 0) |
| 2195 |
fatal("%s: dup() stdout failed", __func__); |
| 2196 |
if(stdfd_devnull(0, 1, 0) == -1) |
| 2197 |
error_f("stdfd_devnull failed"); |
| 2198 |
} |
| 2190 |
/* |
2199 |
/* |
| 2191 |
* If requested and we are not interested in replies to remote |
2200 |
* If requested and we are not interested in replies to remote |