bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subproces


From: Clément Pit--Claudel
Subject: bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10
Date: Mon, 11 Jan 2016 14:41:20 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 01/11/2016 02:33 PM, Eli Zaretskii wrote:
>> Cc: 22344@debbugs.gnu.org
>> From: Clément Pit--Claudel <clement.pit@gmail.com>
>> Date: Mon, 11 Jan 2016 13:02:47 -0500
>>
>>> Thanks.  Are all the affected programs written in JavaScript?  Do they
>>> all set stdin encoding to UTF-8?  If so, does the problem go away if
>>> you remove the line that sets the encoding?
>>
>> No, the following javascript implementation of cat also reproduces the issue:
>>
>> function blackhole() {
>>     process.stdin.resume();
>>     process.stdin.setEncoding("ascii");
>>     process.stdin.on('data', function (chunk) { process.stdout.write(chunk); 
>> });
>> }
>> blackhole();
> 
> Could it be that the script exits as soon as it processed the first 4K
> chunk, without waiting for the next one, or without waiting long
> enough?

I'm not sure if I understand correctly. In the working case (sending small 
batches) the underlying script does receive everything Emacs sends. In fact, 
the blackhole example shown above never exits; it keeps reading on stdin and 
echoing on stdout.

With a more complex setup, Emacs hangs when we send the whole buffer, but when 
sending it in small chunks the underlying process returns the expected results.

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]