in reply to Re^2: Threads Printing Issue - Output Mangled / Term Crashing
in thread Threads Printing Issue - Output Mangled / Term Crashing
Since I'm using Linux, why is a carriage return required?
(Note: most of this is guesswork regarding *nix -- not my FOE -- but its nothing to do with threads)
In the days of old, the linefeed character just moved to the next line; an carriage return was required to move to the start of the line. (Think about how manual typewriters operate. If you ever seen one.)
To the best of my knowledge, most *nix consoles only require LF to cause them to perform both operations, but that's a reinterpretation of the purpose, and probably only operates when the console is operating in 'cooked' mode.
My guess is that
the issue only presents itself when the SSH/tcpdump line is included.
the command you are issuing is switching the terminal into 'raw' (or 'ultra-raw') mode and failing to reset it when it ends. Hence, thereafter, the LF is only moving to the next line, and is failing to return to the left hand edge.
Perhaps the thing to do is use Term::ReadKey::ReadMode() to control/restore the settings after the command ends.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Threads Printing Issue - Output Mangled / Term Crashing
by bigbot (Beadle) on Apr 14, 2014 at 11:37 UTC | |
by BrowserUk (Patriarch) on Apr 14, 2014 at 12:42 UTC |