Why my Emacs in Cygwin running on Windows Seven, always create Crash Dump?

前端 未结 4 1055
梦谈多话
梦谈多话 2021-01-31 20:33

I quite satisfied of how GNU tools run in my Cygwin on Windows Seven. I think it\'s easier just to use GNU/Linux, but my company here has the policy of using Windows Seven for t

相关标签:
4条回答
  • 2021-01-31 21:03

    I have had this same problem in running console emacs through cygwin on Windows 7.

    My solution to this was to install the native GNU Emacs Windows client: http://ftp.gnu.org/gnu/emacs/windows/ and set cygwin's bash.exe as my shell.

    You can see my emacs.d/init.el at https://github.com/tildedave/init.el/blob/master/init.el: here is the part relevant to making sure that the Windows 7 Emacs plays well with cygwin --

    (if is-windows 
        (progn 
          (add-hook 'comint-output-filter-functions
                    'shell-strip-ctrl-m nil t)
          (add-hook 'comint-output-filter-functions
                    'comint-watch-for-password-prompt nil t)
          (setq explicit-shell-file-name "bash.exe")
          (setq shell-file-name explicit-shell-file-name)))
    

    For light-weight in-console editing I use nano, which does not core dump.

    0 讨论(0)
  • 2021-01-31 21:03

    I can't help with the specific issue, but as a possible alternative you could look at running Emacs in a Linux VM hosted on your Windows box. You can use Cygwin's X.org server as the display, so the end result is largely the same as using Cygwin's Emacs.

    It means jumping through a few more hoops, but I find it a good solution, and it will hopefully avoid the crashes.

    I'm using VirtualBox to host my VM.

    0 讨论(0)
  • 2021-01-31 21:13

    I recently ran into this issue when upgrading my version of Cygwin to 1.7.9-1. pserice's solution looked promising but did not work for me. The solution that worked for me was to run rebaseall:

    1. Close ALL Cygwin processes (use Process Explorer to make sure that nothing has cygwin1.dll loaded in it)
    2. Start > Run > Cmd.exe
    3. cd \cygwin\bin
    4. ash
    5. PATH=.
    6. rebaseall -v

    After that, emacs stopped crashing every time it tried to run a subprocess.

    0 讨论(0)
  • 2021-01-31 21:25

    Win7 aborts processes that overwrite parts of the stack. If you trust cygwin executables, you can selectively exclude them as follows:

    Computer -> Properties
             -> Advanced System Settings
             -> Performance
             -> Settings...
             -> Data Execution Prevention
    

    I excluded the following:

    C:\cygwin\bin\bash.exe
    C:\cygwin\bin\emacs.exe
    C:\cygwin\bin\emacs-nox.exe
    C:\cygwin\bin\emacs-X11.exe
    C:\cygwin\bin\startxwin.exe
    
    0 讨论(0)
提交回复
热议问题