From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22344@debbugs.gnu.org
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 [thread overview]
Message-ID: <5693EC13.8050003@gmail.com> (raw)
In-Reply-To: <83io30kobv.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2118 bytes --]
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.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-01-11 17:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 5:42 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 15:37 ` Eli Zaretskii
2016-01-11 16:11 ` Clément Pit--Claudel
2016-01-11 16:31 ` Eli Zaretskii
2016-01-11 16:52 ` Clément Pit--Claudel
2016-01-11 17:18 ` Clément Pit--Claudel
2016-01-11 17:51 ` Eli Zaretskii
2016-01-11 17:55 ` Clément Pit--Claudel
2016-01-11 18:02 ` Clément Pit--Claudel
2016-01-11 19:33 ` Eli Zaretskii
2016-01-11 19:41 ` Clément Pit--Claudel
2016-01-12 16:44 ` Eli Zaretskii
2016-01-14 0:48 ` Clément Pit--Claudel
2016-01-14 18:01 ` Eli Zaretskii
2016-01-14 18:30 ` Clément Pit--Claudel
2016-01-11 16:40 ` Clément Pit--Claudel
2016-01-11 17:39 ` Eli Zaretskii
2016-01-11 17:53 ` Clément Pit--Claudel [this message]
2016-01-13 20:20 ` Benjamin Schwehn
2016-01-13 20:43 ` Eli Zaretskii
2016-01-14 16:36 ` Benjamin Schwehn
2016-01-14 18:05 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5693EC13.8050003@gmail.com \
--to=clement.pit@gmail.com \
--cc=22344@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.