Subject: bug#12697: Emacs crashes when using it as the commit editor for git

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Oct 2012 09:52:11 +0200

> Date: Fri, 26 Oct 2012 22:31:21 -0700
> From: Paul Eggert <[email-masked]>
> CC: Andreas Schwab <[email-masked]>, Eli Zaretskii <[email-masked]>, 
>  Matthew Leach <[email-masked]>
> 
> Instead, how about the attached patch?  It reenables
> the BSD_PGRPS idea, although reimplemented, as the old
> code can't easily be resurrected as-is.  I haven't
> thought about how this affects the Windows port

The termios-related stuff (the call to tcsetgrp) in sysdep.c should be
#ifedf'ed away for Windows (for DOS_NT, actually).  Also, the
references to SIGTTOU should be conditioned on that signal being
defined.

Other than that, this should be OK, I think, since, if setpgid is not
available, it is redirected to setpgrp, which already has a no-op
implementation for Windows.