Messages in this thread | | | Date | Fri, 17 Feb 2012 20:28:25 +0100 | From | Pavel Machek <> | Subject | Re: PROBLEM: Data corruption when pasting large data to terminal |
| |
Hi!
> > Sorry, I didn't emphasize the point that makes me suspect it's a kernel issue: > > > > - strace reveals that the terminal emulator writes the correct data > > into /dev/ptmx, and the kernel reports no short writes(!), all the > > write(..., ..., 68) calls actually return 68 (the length of the > > example file's lines incl. newline; I'm naively assuming I can trust > > strace here.) > > - strace reveals that the receiving application (bash) doesn't receive > > all the data from /dev/pts/N. > > - so: the data gets lost after writing to /dev/ptmx, but before > > reading it out from /dev/pts/N. > > Which it will, if the reader doesn't read fast enough, right? Is the > data somewhere guaranteed to never "overrun" the buffer? If so, how do > we handle not just running out of memory?
Start blocking the writer? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |