diff src/event-unixoid.c @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents 90d73dddcdc4
children 6719134a07c2
line wrap: on
line diff
--- a/src/event-unixoid.c	Mon Aug 13 10:32:23 2007 +0200
+++ b/src/event-unixoid.c	Mon Aug 13 10:33:18 2007 +0200
@@ -257,7 +257,7 @@
   int infd, outfd;
   /* Decode inhandle and outhandle. Their meaning depends on
      the process implementation being used. */
-#ifdef HAVE_WIN32_PROCESSES
+#if defined (HAVE_WIN32_PROCESSES)
   /* We're passed in Windows handles. Open new fds for them */
   if ((HANDLE)inhandle != INVALID_HANDLE_VALUE)
     {
@@ -282,12 +282,12 @@
     outfd = -1;
 
   flags = 0;
-#endif
-
-#ifdef HAVE_UNIX_PROCESSES
+#elif defined (HAVE_UNIX_PROCESSES)
   /* We are passed plain old file descs */
   infd  = (int)inhandle;
   outfd = (int)outhandle;
+#else
+# error Which processes do you have?
 #endif
 
   *instream = (infd >= 0
@@ -300,7 +300,7 @@
 
 #if defined(HAVE_UNIX_PROCESSES) && defined(HAVE_PTYS)
   /* FLAGS is process->pty_flag for UNIX_PROCESSES */
-  if (flags && outfd >= 0)
+  if ((flags & STREAM_PTY_FLUSHING) && outfd >= 0)
     {
       Bufbyte eof_char = get_eof_char (outfd);
       int pty_max_bytes = get_pty_max_bytes (outfd);