no way to disable screen redraws on attaching
Brought to you by:
crigler
Current dtach version appears to provide no way
to disable sending ``redraw screen'' control sequences
on attaching to an existing session.
Those ``redraw screen'' sequences are interpretedas
just ``clear screen'' by line oriented applications
(e.g. shells), thus, attaching to a running session
from another terminal corrupts main session screen.
It would be useful to have a command line option
to control this behaviour.
Logged In: YES
user_id=327158
Right now, when attaching, dtach writes a Ctrl L character to the
program if it is in no-echo and character-at-a-time mode (in addition to
a WINCH signal.) This was mainly done to catch any programs that do not
redraw themselves on a WINCH signal.
I'm thinking about removing the write of the Ctrl L character, and
making dtach rely entirely on the WINCH signal for redraws. From a quick
check, the readline library will redraw only the current screen line
upon a WINCH, which should achieve the same effect that I was aiming
for, without clearing the screen on the other attached terminals.
Alternatively, I could just make it configurable, although it may just
be unnecessary. Are there are any programs that do not handle the WINCH
signal properly? Full-screen programs should fully redraw themselves,
and line-oriented programs should redraw the prompt and so forth, or do
nothing.
Logged In: YES
user_id=327158
I went ahead and used the WINCH method for redraws.
Hopefully there won't be any problems with doing it this
way.