Subject: Re: bug#12579: 24.1; Emacs 24.1 / 24.2 (daily) crashes

From: "Fabrice Niessen" <[email-masked]>
Date: Fri, 09 Nov 2012 14:51:39 +0100

Hello Thierry,

Thierry Volpiatto wrote:
> Eli Zaretskii <[email-masked]> writes:
>> Fabrice Niessen wrote:
>>> Eli Zaretskii wrote:
>>>>> From: "Fabrice Niessen" <[email-masked]>
>>>>>
>>>>> $3 = (struct Lisp_String *) 0x5adb060
>>>>> "locate-process"
>>>>
>>>> Is this process still running, or did it exit already?
>>>
>>> I can't tell you exactly, even if I noticed an es.exe still there when
>>> Emacs was frozen. But I can't tell you with certitude if it was already
>>> there before I even launched Emacs, for example.
>>
>> If you install Process Explorer from here:
>>
>>   http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
>>
>> you will be able to display the processes in a tree-like display, so you
>> will see whether es.exe is a child process of Emacs. And in frame 14, you
>> can see the PID of the process Emacs is waiting for:
>
> When running helm-for-files in WindowsXP in VirtualBox, I don't see the
> "es.exe" running, only "cmdproxy.exe" which exit quickly as soon as
> candidates are found.

I don't use cmdproxy.exe; I use Cygwin bash for all my shell calls:

--8<---------------cut here---------------start------------->8---
      ;; for single shell commands
      (setq shell-file-name
            (cond
                  ((executable-find "bash") "bash")
                  ((executable-find "cmdproxy.exe") "cmdproxy.exe")
                  (t "cmd.exe"))) ;; = system shell

      ;; use `shell-file-name' as the default shell
      (setenv "SHELL" shell-file-name)

      ;; switch used to have the shell execute its command line argument
      ;; (`/c' does not work with XEmacs)
      (setq shell-command-switch
            (cond ((eq shell-file-name "cmd.exe") "/c") ;; using a system shell
                  (t "-c")))

      ;; quote process arguments to ensure correct parsing on Windows
      (setq w32-quote-process-args
            (cond ((eq shell-file-name "cmd.exe") nil) ;; using a system shell
                  (t t)))

      ;; for the interactive (sub)shell (and AUCTeX compilation?)
      (setq explicit-shell-file-name shell-file-name)
--8<---------------cut here---------------end--------------->8---

But I definitely (re-)confirm that I see es.exe processes in the ps command:

1. I type up to 2 chars in the prompt, nothing yet
2. As soon as I type a 3rd one, there is a es.exe process launched...
3. ... running for between a (sub-)second to 27 seconds (when I typed "eee" as
   the pattern, for the first time)
4. es.exe disappears from the ps list without me doing anything else (no extra
   char typed).

If I, then, type a 4th char, another instance of es.exe is launched.

In fact, Emacs launches a bash which launches a es.exe process. To prove my
saying, just have a look at the small screencast I just uploaded on
http://screencast.com/t/djlwcojnw.

> No crash happen as always.

I guess you don't use it for long enough -- sometimes, it takes me a day (of
real work) to get it crash. And I guess I use `helm-for-files' every 10
minutes or so (even, to switch between buffers). Maybe even more frequently...

... or there are other differences coming into play (like reactiveness of my
old laptop, or ...)

Best regards,
Fabrice Niessen