search for: newallpatch

Displaying 1 result from an estimated 1 matches for "newallpatch".

2017 Oct 20
3
Why dup()?
...not, of itself, use stdout; it has no reason to keep stdout open.? As far as I can tell, the change I am proposing has no deleterious effect. WHAT IS THE EXACT CHANGE? This patch allows a program reading ssh's output to see an EOF from the remote session. Good for scripting. Author: David NewallPatch-Name: scriptable-ssh.patch --- diff -u a/ssh.c b/ssh.c --- a/ssh.c +++ b/ssh.c @@ -1837,11 +1837,11 @@ } else { in = dup(STDIN_FILENO); } - out = dup(STDOUT_FILENO); - err = dup(STDERR_FILENO); + out = STDOUT_FILENO; + err = STDERR_FILENO; - if (in < 0 || out < 0 || err < 0) - fatal(&q...