-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Malformed stderr output when stdout is not piped #349
Comments
This is a non-trivial problem for interactive commands. I don't know what command you are using but for, e.g.
The user's terminal needs to be in raw mode so input can be passed to the interactive bash process running in a pseudo-terminal. The I'm not sure why you wouldn't just use strace's
|
Thanks for the reply, appreciated. I suspected the problem may indeed be non-trivial and I'm not sure it can be addressed in sudo without falling back to changing the system wide configuration. For context, there is a command |
The change https://www.sudo.ws/repos/sudo/rev/faa06b1e8913 (78b7121) fixed the problem with 'staircase' output when stdout is piped. However when invoking applications under program like strace (which poduces its output mainly to stderr), it is possible that only stderr is piped, while stdin/stdout remain as they were. In this case, the autodetection of a piped output will fail to identify the scenario correctly and the output of stderr will be badly formatted.
A possible workaround is to pipe the stdout as well, but that has unwanted side effects if the application is interactive like eg. bash.
The text was updated successfully, but these errors were encountered: