Redirection of stdin and stdout can break stdin #38
andry81
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note
Windows XP x64 only issue.
Warning
You must restart console on each test, otherwise it won't reproduce.
There is exist the check command on stdin reopen:
https://github.com/andry81/contools/tree/HEAD/scripts/tools/std/is_stdin_reopen.bat
Test:
Result:
If try to reopen stdin and stdout, then the command inverts the result.
Test:
Result:
Note that the
timeout.execall itself with the inner redirection breaks the stdin. Not thecall; >nul <nulitself.Test:
Result:
Test:
Result:
Note
The reopen order in
call; >nul <nulcommand affects the result.Note
The
call; >nul 2>nuldoes not affect anything nor the order of redirection.Beta Was this translation helpful? Give feedback.
All reactions