[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 12:53:23 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 01/11/2016 12:39 PM, Eli Zaretskii wrote:
>> Cc: 22344@debbugs.gnu.org
>> From: Clément Pit--Claudel <clement.pit@gmail.com>
>> Date: Mon, 11 Jan 2016 11:40:11 -0500
>>
>>> If I modify your loop.cmd to have the following trivial command:
>>>
>>> @cat > foobar
>>>
>>> then Emacs doesn't hang, it happily writes those 4097 bytes, and after
>>> that, I see all of them in the 'foobar' file. Moreover, I tried the
>>> same test with 100 times as many bytes (i.e. 409700), and it still
>>> worked as expected, with all of the bytes ending up in the file.
>>
>> My Windows doesn't have cat; maybe you installed it through cygwin?
>
> No, it's a native Windows port of 'cat' from GNU Coreutils.
>
>> However I tried with Python, and indeed it didn't hang. It seems I
>> oversimplified the example.
>
> So what do the offending programs do differently? Can you describe
> what "jshint", whatever it is, does, it how it reads its stdin? Does
> it also write its stdout, btw?
>
>>> So someone with access to the programs in question will have to step
>>> with a debugger through the code involved in this (I can point to the
>>> relevant parts of the Emacs C code), and find out what goes wrong
>>> there, and why.
>>
>> I don't think my Emacs experience on Windows is quite sufficient for that,
>> but I would be happy ot help if you can guide me. Bear in mind that at the
>> moment I don't even have a build chain set up for Emacs on Windows.
>
> Do you have experience with GDB?
No; but I could learn.
> Also, was the Emacs you have
> compiled with debugging symbols? if so, I can tell you where to look.
I would guess not.
>
>> * This hangs:
>>
>> (let ((process (start-process "bug" nil "node"
>> "c:/Users/cpitclaudel/AppData/Roaming/npm/node_modules/jshint/bin/jshint"
>> "-")))
>> (process-send-string process (make-string 4097 ?a)))
>
> What does jshint do with the stuff it reads from stdin? Does it read
> single bytes or larger chunks?
I've created a simple example without JsHint (in my other response). It seems
to read from stdin asynchronously.
signature.asc
Description: OpenPGP digital signature
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, (continued)
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Clément Pit--Claudel, 2016/01/11
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Clément Pit--Claudel, 2016/01/11
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Eli Zaretskii, 2016/01/11
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Clément Pit--Claudel, 2016/01/11
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Eli Zaretskii, 2016/01/12
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Clément Pit--Claudel, 2016/01/13
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Eli Zaretskii, 2016/01/14
- bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Clément Pit--Claudel, 2016/01/14
bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Clément Pit--Claudel, 2016/01/11
bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10, Benjamin Schwehn, 2016/01/13