delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/18/04:36:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Sigbjorn Finne <sof AT dcs DOT gla DOT ac DOT uk>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: SIGINT, bash and non-cygwin apps
Date: Tue, 18 May 1999 09:34:23 +0100 (BST)
Message-Id: <14145.9743.410485.163620@marcus>
X-Mailer: VM 6.64 under Emacs 19.34.1
MIME-Version: 1.0

Hi,

bog standard B20.1 + egcs-1.1.1 - given the following program

#include <signal.h>
#include <stdio.h>

void handler()
{
 printf("SIGINT received\n");
 signal(SIGINT,handler);
}

int
main()
{
 signal(SIGINT,handler);
 for(;;);
}

compile up mingw and cygwin versions of this

sa$ gcc -v
Reading specs from
C:\Cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\i586-cygwin32/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
sa$ uname -a
CYGWIN_NT-4.0 SARK 20.1 (0.3/1/1) 1998-12-3 20:39:18 i686 unknown
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?

thanks,
--sigbjorn

--
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