public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Michael Rumpf" <michael@rumpfonline.de>
To: <cygwin@cygwin.com>
Subject: Re: bash/cmd CTRL-C problem...
Date: Mon, 07 Jan 2002 00:46:00 -0000	[thread overview]
Message-ID: <00dc01c19758$02b30f10$c51811ac@brokat.de> (raw)
In-Reply-To: <20020104170443.GD30445@redhat.com>

Hi Christopher,

> Here's the harsh reality: it is extremely unlikely that anyone is going
> to investigate this.  If you are using non-cygwin apps with bash and
> CTRL-C doesn't work then you are on your own.

OK.

> I will enthusiastically inspect and evaluate any fixes that you provide
> to cygwin to rectify this situation.  The fixes must not break current
> CTRL-C behavior with cygwin apps.
>
> You are one of a handful of people reporting similar problems.  Everyone
> seems to be trying to do basically the same thing.  They're building
> non-cygwin java apps and complaining that CTRL-C doesn't work right.

It is not a Java app. It is a plain C/C++ app which forks either a C/C++ or
a Java app. You don't have to compile the included Java app, you can just
use the two C/C++ apps to reproduce the problem.
The problem is that the signal handling of the bash is not working correctly
in the C/C++ app which forks others. The CTRL-C (SIGINT) terminates the app
after executing the signal handler in the same way CTRL-BREAK (SIGBREAK)
does but in opposite to the CTRL-BREAK the child processes are not taken
down. The forking app goes into a loop and waits for a flag to be raised
when the SIGINT occurs. But under bash this never happens. The app is always
terminated after handling the signal. After the loop the app tries to send
CTRL-BREAK signals to the child apps and because it is terminated
immediately the code is never reached.

> However, since we are all *cygwin* developers it is not likely that
> we'll want to go to the effort of loading non-cygwin, java software on
> our system to track your problem down for you.

The problem is in a C/C++ app which is linked against Microsoft runtime libs
and the signal handling goes wrong there. First I suspected that it has
something to do with Java but, and that is what the test case shows, it is
independent of it.

I'm "just" use the Cygwin shell environment to have the same shell under NT
as under UNIX. I had a look at how the signal handling in the bash works,
but I found it very complicated and I don't have the time to track it down.
If nobody is interested making non-cygwin apps work the right way under the
bash than I have to use another approach by starting a windows cmd shell to
launch the C/C++ app to make the signal handling work...
The assumption that

> I could be wrong.  Maybe
> someone is actively working on this.  If so, I hope that person steps
> forward and offers some insight into how they are progressing and what
> their proposed fix might be.

That would of course be great...

Thanks,
    Michael



--
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-07  8:46 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 [this message]
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
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='00dc01c19758$02b30f10$c51811ac@brokat.de' \
    --to=michael@rumpfonline.de \
    --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).