delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/10/25/18:01:57

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: "Jon Leichter" <jon AT symas DOT com>
To: <earnie_boyd AT yahoo DOT com>
Cc: <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: SIGINT, bash and non-cygwin apps
Date: Mon, 25 Oct 1999 14:12:54 -0700
Message-ID: <000101bf1f2d$b451c3b0$a0418218@bass.we.mediaone.net>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3

Earnie,

A little while back this year, you wrote the following response:

Re: SIGINT, bash and non-cygwin apps
To: Sigbjorn Finne <sof AT dcs DOT gla DOT ac DOT uk>, cygwin AT sourceware DOT cygnus DOT com
Subject: Re: SIGINT, bash and non-cygwin apps
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Date: Tue, 18 May 1999 06:56:15 -0700 (PDT)
Reply-To: earnie_boyd AT yahoo DOT com

--- Sigbjorn Finne <sof AT dcs DOT gla DOT ac DOT uk> wrote:
>
> #include <signal.h>
> #include <stdio.h>
> void handler()
> {
>     printf("SIGINT received\n");
>     signal(SIGINT,handler);
> }
>
> int main()
> {
>     signal(SIGINT,handler);
>     for(;;);
> }
>
> sa$ gcc -o main-cygwin tst.c
> sa$ gcc -o main-mingw  tst.c -mno-cygwin
>
> If you run 'main-cygwin' under bash everything is cool, SIGINT is
> repeatedly caught. If you run `main-mingw' though, Ctrl+C delivers the
> signal first time around, but then terminates the application (without
> signalling this to the app, as far as I can gather).
>
> Running both versions under cmd.exe works as expected - anyone know
> what's the root cause & if there's a work-around or fix for this?

What is the value of the CYGWIN environment variable?  You must set notty or
not specify it at all to communciate properly with non-cygwin programs.  This
must be done before starting bash.
===
"Earnie Boyd" <mailto:earnie_boyd AT yahoo DOT com>

------------------------------------------------------------------------------
---

There was one more email on this thread from the author, Sigbjorn, where he
indicated that his CYGWIN variable was not set.

I too see this SAME exact problem. My CYGWIN variable is not set, but for
kicks and grins I set it to notty. I did this in the Windows NT System Control
Panel (Environment tab) so that it would be set BEFORE BASH ran. I still see
the same exact problem.

I am using Cygwin B20.1:

  CYGWIN_NT-4.0 BASS 20.1 (0.3/1/1) 1998-12-3 20:39:18 i686 unknown

I little while ago, you told me to upgrade the Jan 15 1999 version of the
Cygwin1.dll. I had done this for a while, and then it gave me a new problem
(that I should probably discuss in a different thread of email). Thus, I've
reverted back to the Dec 12, 1998 version of the DLL.

This problem is quite irritating because what happens is that the signal
handler handles signal, but once the signal handler returns, the entire
application exits.

If you run the same (mingw32) binary under a DOS shell instead of a Cygwin
BASH shell, the problem does not occur.

Jon Leichter
jon AT symas DOT com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019