Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <03f001c197dd$7a9bec10$0200a8c0@lifelesswks> From: "Robert Collins" To: References: <00dc01c19758$02b30f10$c51811ac AT brokat DOT de> <1010394535 DOT 566 DOT 10 DOT camel AT lifelesswks> <011401c19762$04185fe0$c51811ac AT brokat DOT de> <000f01c19766$549cb8e0$0200a8c0 AT lifelesswks> <017b01c1976a$21451e70$c51811ac AT brokat DOT de> <007b01c1977d$6093f520$0200a8c0 AT lifelesswks> <20020107165105 DOT GB4652 AT redhat DOT com> <037a01c197cf$1d0a4000$0200a8c0 AT lifelesswks> <20020107234555 DOT GA11984 AT redhat DOT com> <03ca01c197d9$8a16c510$0200a8c0 AT lifelesswks> <20020108002140 DOT GA12820 AT redhat DOT com> Subject: Re: CGF: please review my logic Re: bash/cmd CTRL-C problem... Date: Tue, 8 Jan 2002 11:43:23 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-OriginalArrivalTime: 08 Jan 2002 00:43:23.0470 (UTC) FILETIME=[7A12BEE0:01C197DD] === ----- Original Message ----- From: "Christopher Faylor" To: Sent: Tuesday, January 08, 2002 11:21 AM Subject: Re: CGF: please review my logic Re: bash/cmd CTRL-C problem... > On Tue, Jan 08, 2002 at 11:15:11AM +1100, Robert Collins wrote: > >----- Original Message ----- > >From: "Christopher Faylor" > >> If you are looking for the "stub" code, it's in spawn_guts, around > >line > >> 1078 in the current sources. > > > >Line 1078 is the EOF for spawn.cc (current CVS). Is that correct? > > Sorry. Misread my vim output. Line 805. No probs. If I read the code correctly, it loops 100 times waiting for * the child to exit * a signal to the stub to arrive * the child to indicate it is a cygwin process (via the spr event) Is that correct? If so, then I see two things to consider: 1) Presumably the CTRL C is arriving via exceptions.cc:(ctrl_c_handler). If so, then IMO we can safely disable this handler once the child is spawned, because a) The child has it's own handler b) This process will terminate as soon as the child does, or the child indicates it's a cygwin process That may introduce a race (fork(), exec(), CTRL-C, child actually starts) - but that could be address'd via queueing the signals until the child shows it's a cygwin process. IMO this race isn't an issue - what do you think? Disabling it could be done via a flag for exceptions.cc in_spawn_stub - so the other types of keyboard interrupt will still be serviced. 2) After 100 signals are sent to the stub, it looks like it will terminate. Was there a problem with hanging stubs that caused a non-infinite loop? Rob -- 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/