This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: signal handler and JNI


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]