From: Ken Brown Date: Fri, 13 Apr 2012 14:50:25 +0000 (-0400) Subject: * src/s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor. X-Git-Tag: emacs-24.2.90~471^2~364^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bcd86815d667681dff8eba8cd376edf2c7f045a2;p=emacs.git * src/s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor. --- diff --git a/src/ChangeLog b/src/ChangeLog index 63cb7a23da4..c23585bdab7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-04-13 Ken Brown + + * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor. + 2012-04-13 Reuben Thomas * indent.c (Fmove_to_column): Change interactive spec (Bug#739). diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 70d64a50c4e..f8c656e8ebc 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -58,7 +58,8 @@ along with GNU Emacs. If not, see . */ if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \ fd = -1; \ sigsetmask (mask); \ - emacs_close (dummy); \ + if (fd >= 0) \ + emacs_close (dummy); \ } \ while (0)