<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for javajiggle.com</title>
	<atom:link href="http://javajiggle.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://javajiggle.com</link>
	<description>Java Jiggle. See what's shaking.</description>
	<lastBuildDate>Sat, 03 Jul 2010 19:22:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by SportsmanVivat</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java%e2%84%a2-rmi-server-and-keep-it-running-on-unix/comment-page-1/#comment-8180</link>
		<dc:creator>SportsmanVivat</dc:creator>
		<pubDate>Sat, 03 Jul 2010 19:22:39 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/?p=8#comment-8180</guid>
		<description>60-?????????? ???? - ????????? ??????? ??????????? ???????. ??????? ???, ???? ????? ???? ???? ??????. ?????? ??????, ????????? ??????, ???????????? ???????? ? ???????? ??????????. ???????????? ????????. ??????: ???? - ?????????? ?????????, ????? - ????? ?????????.</description>
		<content:encoded><![CDATA[<p>60-?????????? ???? &#8211; ????????? ??????? ??????????? ???????. ??????? ???, ???? ????? ???? ???? ??????. ?????? ??????, ????????? ??????, ???????????? ???????? ? ???????? ??????????. ???????????? ????????. ??????: ???? &#8211; ?????????? ?????????, ????? &#8211; ????? ?????????.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by javajiggle</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-2049</link>
		<dc:creator>javajiggle</dc:creator>
		<pubDate>Wed, 08 Jul 2009 23:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-2049</guid>
		<description>Mehul, 
just got back from my vacation.  Let me try to answer your questions. 
1. signal(SIGINT,mySigHandler) or simply using signal from handler function seems not allowed by g++ compiler … any idea why ? 
&gt; I&#039;m not sure what you mean.   Did you include the signal.h?  see included sample below. 

2. how does signal chaining help for handling native code related issues which can raise signal ? 
&gt;If the native code uses signals and creates the JVM, the JVM will override the signal handler in the native code.   The signal chaining allows JVM to determine whether a raised signal was intended for it.   

I believe that in native code, if two or more libraries use the same signals it is possible that at least one of the signal handlers will be overridden.   Thus signal chaining can be used to ensure that the signals are properly dispatched to the right handlers.    If I&#039;m correct, it can be done by first loading a library that will store signal handlers when libraries register their signal handlers.   It will then dispatch signals to the right signals handlers.   This means that the dispatching library must be loaded first, before libraries that implement signal handlers are loaded.

Here is an example (jsig.c) implementation. 
http://xref.jsecurity.net/openjdk-6/langtools/d3/dae/solaris_2vm_2jsig_8c-source.html

3. can we have more insight on 3rd approach of using LD_PRELOAD? 
&gt;LD_PRELOAD simply specifies libraries that must be loaded before other libraries are loaded.   This avoids a need to link with the library that stores and dispatches to the signal handlers.

Signal example:
-----------------------------------------------
#include &lt;signal.h&gt;
#include &lt;stdio.h&gt;
#include &lt;unistd.h&gt;

void handler( int sig ){
	printf(&quot;signal handler invoked, signal: %d \n&quot;, sig );
}

int main(){
	signal( SIGINT, handler );
	printf(&quot;test SIGINT\n&quot;);
	while( 1 ){
		sleep(1000);
	}
	return 1;
}</description>
		<content:encoded><![CDATA[<p>Mehul,<br />
just got back from my vacation.  Let me try to answer your questions.<br />
1. signal(SIGINT,mySigHandler) or simply using signal from handler function seems not allowed by g++ compiler … any idea why ?<br />
> I&#8217;m not sure what you mean.   Did you include the signal.h?  see included sample below. </p>
<p>2. how does signal chaining help for handling native code related issues which can raise signal ?<br />
>If the native code uses signals and creates the JVM, the JVM will override the signal handler in the native code.   The signal chaining allows JVM to determine whether a raised signal was intended for it.   </p>
<p>I believe that in native code, if two or more libraries use the same signals it is possible that at least one of the signal handlers will be overridden.   Thus signal chaining can be used to ensure that the signals are properly dispatched to the right handlers.    If I&#8217;m correct, it can be done by first loading a library that will store signal handlers when libraries register their signal handlers.   It will then dispatch signals to the right signals handlers.   This means that the dispatching library must be loaded first, before libraries that implement signal handlers are loaded.</p>
<p>Here is an example (jsig.c) implementation.<br />
<a href="http://xref.jsecurity.net/openjdk-6/langtools/d3/dae/solaris_2vm_2jsig_8c-source.html" rel="nofollow">http://xref.jsecurity.net/openjdk-6/langtools/d3/dae/solaris_2vm_2jsig_8c-source.html</a></p>
<p>3. can we have more insight on 3rd approach of using LD_PRELOAD?<br />
>LD_PRELOAD simply specifies libraries that must be loaded before other libraries are loaded.   This avoids a need to link with the library that stores and dispatches to the signal handlers.</p>
<p>Signal example:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
#include <signal .h><br />
#include <stdio .h><br />
#include <unistd .h></p>
<p>void handler( int sig ){<br />
	printf(&#8220;signal handler invoked, signal: %d \n&#8221;, sig );<br />
}</p>
<p>int main(){<br />
	signal( SIGINT, handler );<br />
	printf(&#8220;test SIGINT\n&#8221;);<br />
	while( 1 ){<br />
		sleep(1000);<br />
	}<br />
	return 1;<br />
}</unistd></stdio></signal></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by David Klassen</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-2048</link>
		<dc:creator>David Klassen</dc:creator>
		<pubDate>Wed, 08 Jul 2009 23:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-2048</guid>
		<description>You are a pioneer my friend. Thanks for paving the way to a proof my code is not the culprit of the JVM crash.</description>
		<content:encoded><![CDATA[<p>You are a pioneer my friend. Thanks for paving the way to a proof my code is not the culprit of the JVM crash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by Mehul Parekh</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-1901</link>
		<dc:creator>Mehul Parekh</dc:creator>
		<pubDate>Fri, 03 Jul 2009 05:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-1901</guid>
		<description>3 questions.
1) signal(SIGINT,mySigHandler) or simply using signal from handler function seems not allowed by g++ compiler ... any idea why ?
2) how does signal chaining help for handling native code related issues which can raise signal ?
3) can we have more insight on 3rd approach of using LD_PRELOAD?</description>
		<content:encoded><![CDATA[<p>3 questions.<br />
1) signal(SIGINT,mySigHandler) or simply using signal from handler function seems not allowed by g++ compiler &#8230; any idea why ?<br />
2) how does signal chaining help for handling native code related issues which can raise signal ?<br />
3) can we have more insight on 3rd approach of using LD_PRELOAD?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by Sumit Kumar</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-1642</link>
		<dc:creator>Sumit Kumar</dc:creator>
		<pubDate>Wed, 24 Jun 2009 05:49:33 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-1642</guid>
		<description>Clear and Concise! Excellent Work..</description>
		<content:encoded><![CDATA[<p>Clear and Concise! Excellent Work..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by Java Jiggle</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-177</link>
		<dc:creator>Java Jiggle</dc:creator>
		<pubDate>Wed, 08 Apr 2009 21:49:46 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-177</guid>
		<description>signal(SIGINT, mySigHandler); &lt;-- will register mySigHandler function as a handler for SIGINT.   I believe on some platforms you may need to re-register your signal handler or the default handler will be invoked with the next SIGINT.</description>
		<content:encoded><![CDATA[<p>signal(SIGINT, mySigHandler); &lt;&#8211; will register mySigHandler function as a handler for SIGINT.   I believe on some platforms you may need to re-register your signal handler or the default handler will be invoked with the next SIGINT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by Biswa</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-176</link>
		<dc:creator>Biswa</dc:creator>
		<pubDate>Wed, 08 Apr 2009 18:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-176</guid>
		<description>void mySigHandler( int sig ){
	printf(&quot;mySigHandler received signal: %d \n&quot;, sig );
	signal(SIGINT, mySigHandler);---&gt; This does not look right rest understandable
}</description>
		<content:encoded><![CDATA[<p>void mySigHandler( int sig ){<br />
	printf(&#8220;mySigHandler received signal: %d \n&#8221;, sig );<br />
	signal(SIGINT, mySigHandler);&#8212;&gt; This does not look right rest understandable<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on If JNI based application is crashing, check signal handling! by JoeK</title>
		<link>http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/comment-page-1/#comment-104</link>
		<dc:creator>JoeK</dc:creator>
		<pubDate>Wed, 04 Feb 2009 22:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/#comment-104</guid>
		<description>Best description on the web.   I&#039;m amazed how simple the solution is!   This should be better advertised on the sun&#039;s web site.</description>
		<content:encoded><![CDATA[<p>Best description on the web.   I&#8217;m amazed how simple the solution is!   This should be better advertised on the sun&#8217;s web site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Math.pow() performance question&#8230; by javajiggle</title>
		<link>http://javajiggle.com/2009/01/11/mathpow-question/comment-page-1/#comment-101</link>
		<dc:creator>javajiggle</dc:creator>
		<pubDate>Mon, 12 Jan 2009 20:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/?p=34#comment-101</guid>
		<description>Bill D.  that is very interesting.   Can you please clarify whether Math.pow() is 15 times worse than multiplying two numbers x*x, or is it 15 times worse that calling a function that returns two multiplied numbers, like square(x) ?

Also, do you have a test program or a source?</description>
		<content:encoded><![CDATA[<p>Bill D.  that is very interesting.   Can you please clarify whether Math.pow() is 15 times worse than multiplying two numbers x*x, or is it 15 times worse that calling a function that returns two multiplied numbers, like square(x) ?</p>
<p>Also, do you have a test program or a source?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Math.pow() performance question&#8230; by Bill D</title>
		<link>http://javajiggle.com/2009/01/11/mathpow-question/comment-page-1/#comment-100</link>
		<dc:creator>Bill D</dc:creator>
		<pubDate>Mon, 12 Jan 2009 18:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://javajiggle.com/?p=34#comment-100</guid>
		<description>Math.pow() is hugely inefficient, at least 15 times worse than multiplication in Java 1.5.  For readability purposes you have to draw the line at some integer value of N for which you switch from multiplication to using pow(), but for squaring and cubing (probably 99% of the cases for integer exponents) you should never use pow().</description>
		<content:encoded><![CDATA[<p>Math.pow() is hugely inefficient, at least 15 times worse than multiplication in Java 1.5.  For readability purposes you have to draw the line at some integer value of N for which you switch from multiplication to using pow(), but for squaring and cubing (probably 99% of the cases for integer exponents) you should never use pow().</p>
]]></content:encoded>
	</item>
</channel>
</rss>
