Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 6 Nov 2002 17:18:11 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Process does not respond to signals on read() of win32 handle. (fwd)
Message-ID: <20021106221811.GA3240@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <Springmail.0994.1036617738.0.81708100@webmail.atl.earthlink.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Springmail.0994.1036617738.0.81708100@webmail.atl.earthlink.net>
User-Agent: Mutt/1.5.1i

On Wed, Nov 06, 2002 at 04:22:18PM -0500, sanjayl@mindspring.com wrote:
>Hi Mark,
>
>I am running Cygwin on Windows 2000. Here is the output of uname -a
>
>
>
>CYGWIN_NT-5.0 REDBSUNJAY1 1.3.14(0.62/3/2) 2002-10-24 10:48 i686 unknown
>
>And here is a short program that can reproduce the bug.  I just
>CreateFile() COM0 and then map it to a cygwin file desciptor.  I then
>read() on the fd.  At this point the program stops responding to any
>signals (CTRL-C) etc, until some data shows up on the device to wake up
>the read.  I just use g++ com.cpp to compile the executable.

Theoretically, if you pass "/dev/com0" to the "cygwin_attach_handle_to_fd"
it would work correctly.  If you don't pass the name of a known device to
cygwin_attach_handle_to_fd it assumes it is a fast device for which no
special signal handling is necessary.  So, if it blocks, it will not respond
to signals, as you've discovered.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

