Bug 133933

Summary: Konsole does not work as expected when stdout is not buffered in program which run inside it
Product: [Applications] konsole Reporter: Andrey Stepin <omegaminus>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrey Stepin 2006-09-11 21:14:26 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Fedora RPMs
Compiler:          gcc 4.1.0 x86-64 
OS:                Linux

When running some program which unbuffers stdout , konsole shows inappropriate behaviour.
For example:

#!/usr/bin/tclsh
fconfigure stdout -buffering none -blocking false
set i 0
while {1} {
	incr i
	puts -nonewline "$i       \r"
}

This programs executes until Ctrl-C is pressed and displays increasing numbers when run at normal text-mode console.
However, at Konsole it runs for some time and stops randomly at random value of i.
Comment 1 Robert Knight 2006-09-11 21:31:53 UTC
Confirmed.  I get sporadic results here.  Sometimes it works properly, other times it stops as described.
Comment 2 Constantin Berzan 2007-09-11 20:50:38 UTC
The same behavior can be seen in both xterm and gnome-terminal, but not in the text-mode Linux console. What code do Konsole, xterm and gnome-terminal share together?
One more thing: that script starts to eat-up lots of memory once the numbers on the screen stopped updating.
Comment 3 Robert Knight 2007-09-11 21:58:07 UTC
> What code do Konsole, xterm and gnome-terminal share together?

Only glibc, everything higher up the stack is unique.  
Comment 4 Matthew Woehlke 2007-09-11 23:54:24 UTC
> What code do Konsole, xterm and gnome-terminal share together?

They are all pty's and "the text-mode Linux console" is a tty?
Comment 5 Robert Knight 2008-03-18 02:59:38 UTC
I cannot reproduce in KDE 4.1 on Ubuntu 7.10.  I assume something changed in a lower-level library since this was first reported.  

Marking as WORKSFORME