X-Spam-Check-By: sourceware.org From: "Dave Korn" To: 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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/