Skip to content

Fix returning to stdout after redirection.#103

Closed
marsupial wants to merge 2 commits intoroot-project:masterfrom
marsupial:PR/4
Closed

Fix returning to stdout after redirection.#103
marsupial wants to merge 2 commits intoroot-project:masterfrom
marsupial:PR/4

Conversation

@marsupial
Copy link
Contributor

Calling dup2 to get back to STDOUT_FILENO will reopen stdout without line buffering if no output had been written before the redirect occurred.

@Axel-Naumann
Copy link
Member

Wonderful, that does it! And I'll still look into reducing the amount of Attach/Detach calls - it's probably related to PR #99 Thanks for this fix and pointing out the Attach issue!

@marsupial
Copy link
Contributor Author

Don't forget the other issue where ROOT should be creating MetaProcessor::MaybeRedirectOutputRAII before it writes its prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants