Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Chris Faylor Date: Wed, 11 Oct 2000 23:29:01 -0400 To: cygwin AT sources DOT redhat DOT com Subject: Re: signals while reading Message-ID: <20001011232901.A15742@cygnus.com> Reply-To: cygwin AT sources DOT redhat DOT com Mail-Followup-To: cygwin AT sources DOT redhat DOT com References: <39E52FEA DOT 9EF500CA AT tpf DOT co DOT jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <39E52FEA.9EF500CA@tpf.co.jp>; from Inoue@tpf.co.jp on Thu, Oct 12, 2000 at 12:28:43PM +0900 On Thu, Oct 12, 2000 at 12:28:43PM +0900, Hiroshi Inoue wrote: >Hi all, > >I tried the following program on my machine. >( CYGWIN_NT-5.0 1.1.4(0.26/3/2) 2000-08-03 20:53 win2k) > >#include >#include >#include > >void sigfunc(int sig) >{ > fprintf(stderr, "received signal=%d\n", sig); > exit(1); >} >main() >{ > char rdt[8]; > > signal(SIGTERM, sigfunc); > while (1) > { > fprintf(stderr,"read wait -> "); > read(0, rdt, 1); > fprintf(stderr,"read return %d\n", errno); > if (errno != EINTR) > break; > } >} > >When I kill this program, I see the following. > >read wait -> read return 4 >read wait -> read return 4 >read wait -> read return 4 >........ >(inifinite loop) > >Is this a expected behavior ? >Note that sigfunc() isn't called. It's a bug in 1.1.4. cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com