delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/07/11:51:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 7 Jan 2002 11:51:05 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: CGF: please review my logic Re: bash/cmd CTRL-C problem...
Message-ID: <20020107165105.GB4652@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <00dc01c19758$02b30f10$c51811ac AT brokat DOT de> <1010394535 DOT 566 DOT 10 DOT camel AT lifelesswks> <011401c19762$04185fe0$c51811ac AT brokat DOT de> <000f01c19766$549cb8e0$0200a8c0 AT lifelesswks> <017b01c1976a$21451e70$c51811ac AT brokat DOT de> <007b01c1977d$6093f520$0200a8c0 AT lifelesswks>
Mime-Version: 1.0
In-Reply-To: <007b01c1977d$6093f520$0200a8c0@lifelesswks>
User-Agent: Mutt/1.3.23.1i

On Tue, Jan 08, 2002 at 12:15:27AM +1100, Robert Collins wrote:
>Ok.
>I didn't realise that signal() is implemented in the standard VC++
>libraries.
>Can you tell me any details of the signal implementation you are using
>on win32?
>If you wished to follow clean room r/e for this, I can implement the
>signal sending side to match up with what your library expects.
>
>Also, according to
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore9
>8/HTML/_crt_signal.asp
>
>
>SIGINT is not supported for win32 programs. I quote:
>"Note SIGINT is not supported for any Win32 application including
>Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32
>operating systems generate a new thread to specifically handle that
>interrupt. This can cause a single-thread application such as UNIX, to
>become multithreaded, resulting in unexpected behavior. "
>
>As for why you see the current behaviour, I'm a little mystified.
>
>Here's why:
>
>Firstly, here's a snippet of the output of a strace of kill -2
><signals.exe pid>
>
> 2149 2816627 [main] kill 920 _kill: kill (3656, 2)
> 1542 2818169 [main] kill 920 sig_send: pid 3656, signal 2, its_me 0
> 1387 2819556 [main] kill 920 getsem: pid 3656, ppid 3648, wait 1000,
>initializing 0
> 1776 2821332 [main] kill 920 sig_send: Not waiting for sigcomplete.
>its_me 0 signal 2
> 3817 2825149 [main] kill 920 sig_send: returning 0 from sending signal
>2
> 2529 2827678 [main] kill 920 kill_worker: 0 = kill_worker (3656, 2)
>
>The getsem line is whats interesting: This is retrieving the semaphore
>used to syncronise the signalling across process's.
>
>It succeeds! (I'm running a slightly modified cygwin here, which as the
>patch at the end of this email shows (in combination with the source :})
>should always indicate if there is an error).

It should always succeed.  A non-cygwin app should have a cygwin stub
associated with it.

cgf

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

- Raw text -


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