public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Robert Collins" <robert.collins@itdomain.com.au>
To: <cygwin@cygwin.com>
Subject: Re: CGF: please review my logic Re: bash/cmd CTRL-C problem...
Date: Mon, 07 Jan 2002 16:43:00 -0000	[thread overview]
Message-ID: <03f001c197dd$7a9bec10$0200a8c0@lifelesswks> (raw)
In-Reply-To: <20020108002140.GA12820@redhat.com>


===
----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin@cygwin.com>
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" <cgf@redhat.com>
> >> 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/

  reply	other threads:[~2002-01-08  0:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-19 23:48 Michael Rumpf
2001-12-20  1:28 ` Michael Rumpf
2001-12-21  2:17   ` Michael Rumpf
2001-12-21  7:27     ` Corinna Vinschen
2001-12-21  8:46       ` Michael Rumpf
2002-01-04  3:51     ` Michael Rumpf
2002-01-04  9:04       ` Christopher Faylor
2002-01-07  0:46         ` Michael Rumpf
2002-01-07  1:10           ` Robert Collins
2002-01-07  1:58             ` Michael Rumpf
2002-01-07  2:30               ` Robert Collins
2002-01-07  2:56                 ` Michael Rumpf
2002-01-07  5:15                   ` CGF: please review my logic " Robert Collins
2002-01-07  6:18                     ` Michael Rumpf
2002-01-07  8:50                     ` CGF: " Christopher Faylor
2002-01-07 15:00                       ` Robert Collins
2002-01-07 15:45                         ` Christopher Faylor
2002-01-07 16:15                           ` Robert Collins
2002-01-07 16:21                             ` Christopher Faylor
2002-01-07 16:43                               ` Robert Collins [this message]
2002-01-07 23:00                                 ` Robert Collins
2002-01-08  8:19                                   ` Christopher Faylor
2002-01-08 14:16                                     ` Robert Collins
2002-01-08 16:39                                       ` Christopher Faylor
2002-01-08 16:43                                         ` Robert Collins
2002-01-08 16:55                                           ` Christopher Faylor
2002-01-08 16:57                                             ` Robert Collins
2002-01-08 17:13                                               ` Christopher Faylor
2002-01-08 17:16                                                 ` Robert Collins
2002-01-09 18:46                                                   ` Christopher Faylor
2002-01-09 19:42                                                     ` Christopher Faylor
2002-01-09 23:59                                                     ` Robert Collins
2002-01-10  7:53                                                       ` Christopher Faylor
2002-01-08 17:46                                                 ` Charles Wilson
     [not found]                                   ` <027401c19855$68842f60$c51811ac@brokat.de>
     [not found]                                     ` <03a901c1989b$69c8e190$0200a8c0@lifelesswks>
2002-01-09  0:14                                       ` Michael Rumpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='03f001c197dd$7a9bec10$0200a8c0@lifelesswks' \
    --to=robert.collins@itdomain.com.au \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).