# HG changeset patch # User Vin Shelton # Date 1427226643 14400 # Node ID 4949ccab25f18e5ed4d3e625a604eb837c32fd0d # Parent 3ed83b4b4882f4bc73fd13b9de1410efde9bb2e2 Get M-x shell working on cygwin diff -r 3ed83b4b4882 -r 4949ccab25f1 src/ChangeLog --- a/src/ChangeLog Sat Mar 21 00:15:17 2015 +0900 +++ b/src/ChangeLog Tue Mar 24 15:50:43 2015 -0400 @@ -1,3 +1,9 @@ +2015-03-24 Vin Shelton + + * process-unix.c: Move disconnect_controlling_terminal() call + later in create_process_unix(). This is necessary for Cygwin, but + seems to work on linux (at least), too. + 2015-03-20 Aidan Kehoe * data.c (build_fixnum_to_char_map): diff -r 3ed83b4b4882 -r 4949ccab25f1 src/process-unix.c --- a/src/process-unix.c Sat Mar 21 00:15:17 2015 +0900 +++ b/src/process-unix.c Tue Mar 24 15:50:43 2015 -0400 @@ -1122,9 +1122,10 @@ /* Disconnect the current controlling terminal, pursuant to making the pty be the controlling terminal of the process. - Also put us in our own process group. */ - - disconnect_controlling_terminal (); + Also put us in our own process group. + Moved this call to later in the function, because on Cygwin, + setsid() causes the pty setup to fail in some way. + disconnect_controlling_terminal (); */ if (pty_flag) { @@ -1243,6 +1244,11 @@ child_setup_tty (xforkout); } /* if (pty_flag) */ + /* Moved this here because of Cygwin. Vin Shelton 2015-03-24. */ + /* Disconnect the current controlling terminal, pursuant to + making the pty be the controlling terminal of the process. + Also put us in our own process group. */ + disconnect_controlling_terminal (); EMACS_SIGNAL (SIGINT, SIG_DFL); EMACS_SIGNAL (SIGQUIT, SIG_DFL);