tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pty(4) 1024 bytes buffer limit



> I wonder if the pty buffer size is what is limiting my pastes in
> xterms.

Could be.  But there is another possible culprit.

I've long had issues with pastes in my own terminal emulator.  Every
once in a while I ahve a look.  The most recent look led to this
fragment of the main .c file, in the code responsible for writing data
to the pty:

[n is set to the amount of data available to be written]
       /*
        * We really shouldn't need to limit n.  But if we don't, we
        *  write in bursts of 900 bytes, which ends up overflowing
        *  typical TTYHOG values with the echo before we get a chance
        *  to consume any of it.
        *
        * Using 256 is theoretically wrong, since we have no a priori
        *  reason to believe that the TTYHOG (or local equivalent)
        *  value is as large as this expects (ca. 530 or greater).  But
        *  it seems to work well enough in practice.  Blech.
        */
       if (n > 256) n = 256;

There's also a possible issue with direct selection data transfer
versus INCR data transfer, but in xterm's case that is unlikely to be
what's behind your problem.  It's hard to be sure; you outline
conditions under which you see misbehaviour but you don't say what the
misbehaviour actually is.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index