delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/21/06:26:13

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: signal handler and JNI
Date: Tue, 21 Feb 2006 11:25:56 -0000
Message-ID: <00c901c636d9$95245ff0$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
In-Reply-To: <loom.20060221T111136-774@post.gmane.org>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 21 February 2006 10:20, Alex Dupre wrote:

> Alex Dupre <sysadmin <at> alexdupre.com> writes:
> 
>> Yes, I've read it before posting to the list, but I cannot see where it
>> explains why I should call a print function to get the signal handled.
>> And not every print function, sprintf() doesn't work, printf() with empty
>> string doesn't work, currently I succeded with printf() and putc() to
>> stdout and /dev/null (that's the workaround I'm using now, since I don't
>> want anything printed out). I'd like to know if there is another or more
>> appropriate function that I should call.
> 
> Actually putc() wasn't working, it was the fopen/fclose on /dev/null to
> deliver the signal. Anyway, I found a better workaround, calling sleep(0)
> does the job. If you could tell me why a putc('.') doesn't work and a
> sleep(0) works, it'd be nice :-)
> 

  putc comes from newlib and is not cygwin-signal-mechanism-aware, whereas
(nano)sleep comes from cygwin and calls sig_dispatch_pending ();

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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