mkotyk / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

hold=always & exit 0 => cleaning the screen #255

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. mintty --hold=always --exec /bin/bash --login -i
2. some executions...
3. exit 0

It's cleaning the screen when "exit" is used.
Before of Cygwin updates it just shown the "logout" without cleaning the screen.
I don't know if it's something with bash or w32api or base-files or whatever.
The problem is with some scripts that I have always to scroll-up to can see the 
screen's output.

Versions of mintty is 0.9.6, Cygwin's version is 1.7.8-1, and I'm using Windows 
XP.

Changed packages:
-_update-info-dir        00949-1             OK
+_update-info-dir        00956-1             OK
-base-files              3.9-3               OK
+base-files              4.0-6               OK
-cygport                 0.10.3-1            OK
+cygport                 0.10.4-1            OK
-gcc4                    4.3.4-3             OK
-gcc4-core               4.3.4-3             OK
-gcc4-g++                4.3.4-3             OK
+gcc4                    4.3.4-4             OK
+gcc4-core               4.3.4-4             OK
+gcc4-g++                4.3.4-4             OK
-gzip                    1.3.12-2            OK
+gzip                    1.4-1               OK
-libffi4                 4.3.4-3             OK
+libffi4                 4.3.4-4             OK
-libgcc1                 4.3.4-3             OK
-libgcj-common           4.3.4-3             OK
-libgcj9                 4.3.4-3             OK
+libgcc1                 4.3.4-4             OK
-libgfortran3            4.3.4-3             OK
+libgfortran3            4.3.4-4             OK
-libgnat4.3              4.3.4-3             OK
+libgnat4.3              4.3.4-4             OK
-libgomp1                4.3.4-3             OK
+libgomp1                4.3.4-4             OK
-libobjc2                4.3.4-3             OK
+libobjc2                4.3.4-4             OK
-libopenssl098           0.9.8r-1            OK
+libopenssl098           0.9.8r-2            OK
-libserf0_1              0.7.0-1             OK
+libserf0_1              0.7.1-1             OK
-libssp0                 4.3.4-3             OK
-libstdc++6              4.3.4-3             OK
-libstdc++6-devel        4.3.4-3             OK
+libssp0                 4.3.4-4             OK
+libstdc++6              4.3.4-4             OK
+libstdc++6-devel        4.3.4-4             OK
-openssl                 0.9.8r-1            OK
+openssl                 0.9.8r-2            OK
-subversion              1.6.15-1            OK
-subversion-perl         1.6.15-1            OK
-subversion-python       1.6.15-1            OK
-subversion-ruby         1.6.15-1            OK
-subversion-tools        1.6.15-1            OK
+subversion              1.6.16-1            OK
+subversion-perl         1.6.16-1            OK
+subversion-python       1.6.16-1            OK
+subversion-ruby         1.6.16-1            OK
+subversion-tools        1.6.16-1            OK
-w32api                  3.15-1              OK
+w32api                  3.17-2              OK

ps. Another thing that was useful for scripts: "When keeping the window open 
after the command is finished, the cursor is switched off and the window has to 
be closed with the Close button or Alt+F4, rather than just any key."

Original issue reported on code.google.com by dxdemetr...@gmail.com on 28 Mar 2011 at 8:42

GoogleCodeExporter commented 8 years ago
Hmm, the screen clearing is done by the latest /etc/bash.bash_logout:

  # when leaving the console clear the screen to increase privacy
  if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear ] && /usr/bin/clear
  fi

I think that's rather silly, but it's not a mintty issue. Please raise it on 
the Cygwin mailing list and/or fix it locally.

ps: Not entirely sure what you're saying there, but I assume you're missing the 
close-on-any-key feature. I removed that because of the possibility of closing 
windows accidentally, and also because xterm doesn't do it that way.

Original comment by andy.koppe on 29 Mar 2011 at 6:43

GoogleCodeExporter commented 8 years ago
Thanks for finding-out the screen cleaning issue, I'll check it.

ps: Yes, I'm missing the close-on-any-key feature (just I didn't know how to 
say it, that's why I didn't opened a separated issue).
If we need to avoid the possibility of closing windows accidentally, it 
couldn't be used some predefined key like "Enter" instead of any key, or some 
selectable option like "-close-on-key=option"?
It was helpful for scripts because it was a fast way to know that there isn't 
any background process running, anything in script is finished and the exit 
status is 0.

Original comment by dxdemetr...@gmail.com on 29 Mar 2011 at 9:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
You're welcome.

ps: An option for that is out of the question, but close-on-Enter seems 
reasonable. Please do enter a separate enhancement issue for it.

Original comment by andy.koppe on 29 Mar 2011 at 11:28