Subject: bug#24531: bug#6149: bug#24531: process-send-string seems to truncate lines over 4096 characters

From: Dmitry Gutov <[email-masked]>
Date: Thu, 27 Jul 2023 04:48:18 +0300

On 21/07/2023 16:58, Spencer Baugh wrote:
>> But I'm actually wondering how come modern Linux kernels don't have a
>> way of lifting this restriction, or at least enlarging the limit so it
>> makes the problem even less frequent.  Is there some inherent
>> limitation that this must be 4KB and nothing larger?
> Unfortunately from looking at Linux the limit of 4096 seems to be
> hardcoded.

If some syscall or etc limits the length of a string to 4096, can't we 
detect this case, split the string and emit said call multiple times?

This function's docstring already mentions the case of

   If STRING is larger than the input buffer of the process, ...
   it is sent in several bunches