Note that there are some explanatory texts on larger screens.

plurals
  1. POOn W32 Emacs why does Ctrl-D in Cygwin or MinGW bash issues repeated EOFs?
    primarykey
    data
    text
    <p>I'm using W32 GNU Emacs 24.1.50.1 with Cygwin bash 3.2.51. I know that this combination is very troublesome (see <a href="http://emacswiki.org/emacs/NTEmacsWithCygwin" rel="nofollow noreferrer">EmacsWiki</a> and <a href="http://cygwin.com/ml/cygwin/2012-05/msg00114.html" rel="nofollow noreferrer">Cygwin list</a>). However the problem I want to solve now is not confined to Cygwin. I got the issue with MinGW as well. So, the problem is:</p> <p>In Emacs start a shell via <code>M-x shell</code> provided you have set up the variables <code>shell-file-name</code> and <code>explicit-bash-args</code> appropriately (see e.g. <a href="https://stackoverflow.com/questions/235254/how-can-i-run-cygwin-bash-shell-from-within-emacs">here</a>). Then issue a command which expects stdin input, e.g. <code>cat</code>. To cancel out of <code>cat</code> you can usually type Ctrl-D <em>once</em> and you return to the shell prompt. In W32 emacs when you do this (or even when you issue explicitly <code>M-x comint-send-eof</code>) the cat command gets exited <em>and</em> the bash shell quits as well.</p> <p>I tried to increases bash's "resilience' by setting the environment variable <code>IGNOREEOF</code> to, say, 5, but then a single Ctrl-D results in the following output</p> <pre><code>$ Use "exit" to leave the shell. $ Use "exit" to leave the shell. $ Use "exit" to leave the shell. $ Use "exit" to leave the shell. $ Use "exit" to leave the shell. $ exit Process shell finished </code></pre> <p>and, of course, the bash has exited again. This problem only happens when the shell runs in W32 emacs - Cygwin bash through the Cygwin tty window and MinGW bash through its own MinTTY work fine.</p> <p>Why is this happening in W32 Emacs and how can I just exit the running subcommand (e.g. <code>cat</code>) when using W32 Emacs without exiting the bash shell?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload