diff src/process-unix.c @ 5875:4949ccab25f1

Get M-x shell working on cygwin
author Vin Shelton <acs@xemacs.org>
date Tue, 24 Mar 2015 15:50:43 -0400
parents a216b3c2b09e
children
line wrap: on
line diff
--- 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);