--- term.c 2007-08-30 06:46:50.000000000 +0900 +++ /tmp/term.c.fixed 2007-09-03 09:15:22.915209300 +0900 @@ -3131,6 +3131,10 @@ setpgrp (); no_controlling_tty = 1; #else +#ifdef CYGWIN + setsid (); + no_controlling_tty = 1; +#else #ifdef TIOCNOTTY /* Try BSD ioctls. */ sigblock (sigmask (SIGTTOU)); fd = emacs_open ("/dev/tty", O_RDWR, 0); @@ -3145,6 +3149,7 @@ /* Unknown system. */ croak (); #endif /* ! TIOCNOTTY */ +#endif /* ! CYGWIN */ #endif /* ! USG */ } #endif