delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/06/14:11:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 06 Oct 2004 12:10:49 -0600
From: Mark Paulus <mark DOT paulus AT mci DOT com>
Subject: Patch for fhandler_tty.cc
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Message-id: <0I56004L8D61CZ@pmismtp02.mcilink.com>
MIME-version: 1.0
X-IsSubscribed: yes

Hi,

While trying to port xtermcontrol, I found a problem
where it would hang.  Turns out, there is a small
one-liner that appears to be something that was
missed when the code either written, or later
enhanced.  The code currently breaks the handling
of the case of MIN==0, TIME > 0.  The call never 
returns because waiter is incorrectly being set to infinite.

Patch is included below:

--- fhandler_tty_old.cc 2004-10-06 12:05:54.196444800 -0600
+++ fhandler_tty.cc     2004-10-06 12:06:13.465645500 -0600
@@ -766,7 +766,7 @@ fhandler_tty_slave::read (void *ptr, siz
   w4[0] = signal_arrived;
   w4[1] = input_available_event;

-  DWORD waiter = !ptr ? 0 : INFINITE;
+  DWORD waiter = time_to_wait;
   while (len)
     {
       rc = WaitForMultipleObjects (2, w4, FALSE, waiter);




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019