Date: Thu, 19 Aug 2010 15:08:59 +0200 From: Michael Sperber <sperber@deinprogramm.de> To: freebsd-hackers@freebsd.org Subject: Data truncation on ptys Message-ID: <y9lk4nmeolw.fsf@deinprogramm.de>
next in thread | raw e-mail | index | archive | help
I'm one of the maintainers of XEmacs, and I've been running into a persistent problem with subprocesses / ptys since at least 5.x. (If this is not the right list, I'd appreciate a pointer to a more appropriate forum.) Here's the basic issue: Whenever XEmacs tries to send a larger chunk of data to a subprocess over a pty, only part of the data arrives at the other end of the pty. XEmacs tries very hard to chop up the data into (245-byte) pieces, terminating the pieces with NL or EOF as appropriate. Still, when around 7.5 kilobyte is sent rapidly, I see this pattern: master truss: write(7," 1692 1693 1694 1695 1696 1697 1"...,245) = 245 (0xf5) write(7,"\^D",1) = 1 (0x1) slave/subprocess truss ("cat" in this case): read(0," 1692 1693 1694 1695 1696 1697 1"...,4096) = 144 (0x90) Subsequent writes from the master do not get seen *at all* on the slave, i.e. the next read blocks. If anybody could shed some light on this issue, help would be much appreciated! -- Regards, Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?y9lk4nmeolw.fsf>