From: "Robert Collins" <robert.collins@itdomain.com.au>
To: <cygwin@cygwin.com>
Subject: Re: bash/cmd CTRL-C problem...
Date: Tue, 08 Jan 2002 16:43:00 -0000 [thread overview]
Message-ID: <042a01c198a6$b03bb2a0$0200a8c0@lifelesswks> (raw)
In-Reply-To: <20020109003913.GA28328@redhat.com>
----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
> >* The new process must not have signalled it's creation back to us.
>
> I don't think this is right, actually. You basically don't want the
stub
> to *ever* send a CTRL-C in your scenario. I don't see why it matters
that
> the subprocess has been reparented. You especially don't want the
parent to
> be responding to CTRL-Cs when the child has indicated "Yep! I'm a
cygwin
> process."
What I meant was, that once the child has signaled it's a cygwin
process, we terminate the stub immediately anyway. But yes, perhaps we
should not re-enable CTRL-C processing.
> >Hangon, look closer.
> >If the execed process is a *cygwin* process, then my patch makes no
> >difference - the stub is about to quit no matter what, and from a
POSIX
> >point of view, already has!
>
> You're right. I did need to look closer.
>
> However, IMO, there's a race here. It's possible that killing other
> members of the process group is the right thing to do if the child is
> still initializing and is unable to handle the CTRL/C correctly. Your
> patch eliminates that capability so it may mean that CTRL-C's are
lost.
>
> >If the execed process is not a cygwin process, then it will handle
(or
> >not) CTRL-C itself. We should *not* force quit it when the stub
recieves
> >CTRL-C.
>
> Oddly enough, that is behavior that I reinstated when I had eliminated
> it for a while because people complained that they couldn't kill their
> processes. If you don't do that then GUI windows apps don't go away
> when you hit CTRL-C, IIRC.
>
> This is the usual cygwin damned if you do/damned if you don't
scenario.
Hmm. Well CTRL-C and CTRL-BREAK are identified separately. I'll go have
a browse of the lists I guess.
> >I don't reinstate default behaviour, we simply ignore the keyboard
> >generated CTRL-C which we know that the non-cygwin child has already
> >recieved.
>
> We know that the child will receive or is about to receive it but we
> don't know that the child is about to do the right thing as a result
> of receiving it.
True. The issue IMO is whether we assume the child will do the right
thing, or whether we assume the child won't. If it's a cygwin child
it'll do the right thing after being reparented. If it's a non-cygwin
child it'll do the right thing on it's own.
> >> Also, your change seems to make no distinction between a spawned
and
> >> execed process.
>
> As I mentioned, this observation was just completely wrong. :-(
>
> I have to think about the race issues here. It seems like you can't
get
> away without some kind of additional communication between the parent
and
> the child.
True. The problem is that we can't communicate with non-cygwin children.
So there will always be a window (from when a process is created to when
we find out it's a cygwin process) where we have to guess :}.
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/
next prev parent reply other threads:[~2002-01-09 0:43 UTC|newest]
Thread overview: 44+ 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
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 [this message]
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
2002-01-07 8:09 Gregory W. Bond
2002-01-07 8:27 ` Michael Rumpf
2002-01-07 9:06 ` Gregory W. Bond
2002-01-07 9:18 ` Michael Rumpf
2002-01-07 9:32 ` Christopher Faylor
2002-01-07 9:28 Gregory W. Bond
2002-01-07 10:07 ` Christopher Faylor
2002-01-07 12:14 ` Gregory W. Bond
[not found] <3C3E059B.2080401@ece.gatech.edu>
2002-01-11 4:01 ` Andy Piper
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='042a01c198a6$b03bb2a0$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).