unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: rcopley@gmail.com, 19868@debbugs.gnu.org
Subject: bug#19868: #19868 25.0.50; Compilation eats buffers
Date: Sat, 13 Aug 2016 09:44:29 +0300	[thread overview]
Message-ID: <83h9apdv76.fsf@gnu.org> (raw)
In-Reply-To: <CAM-tV--EuJiHpdhXba1t1ohkVkDmcOR7h2SdbCob-i1_radspQ@mail.gmail.com> (message from Noam Postavsky on Fri, 12 Aug 2016 16:47:07 -0400)

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Fri, 12 Aug 2016 16:47:07 -0400
> Cc: Richard Copley <rcopley@gmail.com>
> 
> I reproduced this (the hanging, not the buffer eating) on Windows 10,
> Emacs 25.1, MinGW64.  Stepping with gdb I found the the hang occurs in
> sys_close where it calls _close (fd).  This is being called from
> deactivate_process:
> 
>   for (i = 0; i < PROCESS_OPEN_FDS; i++)
>     close_process_fd (&p->open_fd[i]); // <-- when i == 2

Does it hang in the _close call itself, or somewhere else?

And what is the value of fd?

Can you instrument the relevant code with printf's and see this
happening without stepping through the code with GDB?  Doing the
latter might change the timing of the calls, so we might be trying to
use file descriptors when the process (cmdproxy) is already dead, and
so the other end of the pipe no longer exists.

In any case, this is a tricky situation, because we kill the shell,
not the program it runs.  When the program run from the shell was
built with -mwindows, it is detached from the shell, and the various
Emacs facilities that try to kill subprocesses are likely to fail in
exciting ways.

IOW, running -mwindows programs from the likes of "M-x compile" is not
really supported on MS-Windows, I think.  Of course, if we can figure
out how to avoid the hang in this case, we should.





  reply	other threads:[~2016-08-13  6:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14 19:30 bug#19868: 25.0.50; Compilation eats buffers Richard Copley
2015-02-15 17:53 ` Eli Zaretskii
2015-02-17  0:25   ` Richard Copley
2016-08-12 20:47 ` bug#19868: #19868 " Noam Postavsky
2016-08-13  6:44   ` Eli Zaretskii [this message]
2016-08-15 22:19     ` Noam Postavsky
2016-08-16 14:18       ` Eli Zaretskii
2016-08-16 21:17         ` Noam Postavsky
2016-08-17 15:15           ` Eli Zaretskii
2016-08-29 21:48             ` Noam Postavsky

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h9apdv76.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=19868@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    --cc=rcopley@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).