-
-
Notifications
You must be signed in to change notification settings - Fork 268
Redirect both stderr and stdout into the log file but use the original fds for actually intended user input/output #1391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect both stderr and stdout into the log file but use the original fds for actually intended user input/output #1391
Conversation
…condition for issue 885)
…ns that are intended to replace current user input functionality that calls select or read directly (a precondition for issue 885)
…from original STDIN and output on original STDOUT and STDERR (a precondition for issue 885)
… on original STDOUT and STDERR (a precondition for issue 885)
…tion for issue 885)
|
Meanwhile it seems to look o.k. for me when I run rear -d -D mkbackup 2>/dev/null rear -d -D recover 2>/dev/null i.e. what is missing is to fix all the old deprecated usage of '>&8' |
gdha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsmeix as you mentioned that you ran some dry runs without issues I trust you that it works fine
|
By meditating over the weekend how I could First setp (within this pull request) Second step via #887 |
…keep failure output via stderr
|
Manwhile this pull request has changed from my initial attempt to In lib/_input-output-functions.sh I do (excerpts): # Duplicate STDIN to fd6 ... exec 6<&0 # Duplicate STDOUT to fd7 ... exec 7>&1 # Duplicate STDERR to fd8 ... exec 8>&2 that is sourced before I do in usr/sbin/rear # Redirect both STDOUT and STDERR into the log file. ... exec 2>>"$RUNTIME_LOGFILE" ... exec 1>&2 In all user input/output functions and in all scripts To keep backward compatible behaviour |
|
Because it works well for me and I did not change |
|
In https://github.com/rear/rear/wiki/Coding-Style |
|
In #1391 (comment) |
|
So should we revert it? |
|
@schlomo From my point of view all the other changes in this pull request |
This is a precondition for #885
The very first step is some cleanup and enhancements
of the messages output functions in _input-output-functions.sh
Be patient - do not merge it yet - more needs to come here...