<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; Signal handler</title>
	<atom:link href="https://www.emblogic.com/blog/tag/signal-handler/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>not executing the Signal handler function</title>
		<link>https://www.emblogic.com/blog/06/not-executing-the-signal-handler-function/</link>
		<comments>https://www.emblogic.com/blog/06/not-executing-the-signal-handler-function/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 04:41:08 +0000</pubDate>
		<dc:creator><![CDATA[sourabh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Signal handler]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=724</guid>
		<description><![CDATA[Hi All, in the following program I have observed that the program is not jumped on the handler but if i remove the statement sleep(1); it work fine. the piece of the code is &#8230; while(1) { if (flag) printf(&#8220;waiting &#8230; <a href="https://www.emblogic.com/blog/06/not-executing-the-signal-handler-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Hi All,</p>
<p>in the following program I have observed that the program is not jumped on the handler but if i remove the statement sleep(1); it work fine.</p>
<p>the piece of the code is</p>
<p>&#8230;</p>
<p>while(1)</p>
<p>{</p>
<p>if (flag)</p>
<p>printf(&#8220;waiting for signal&#8221;);</p>
<p>else</p>
<p>printf(&#8220;signal invoked&#8221;);</p>
<p>sleep(1);</p>
<p>}</p>
<p>my question is when we press Ctrl+C (generating a signal) in such case the program should moved to signal handler function but in this case why it is not working correctly while having sleep(1); statement there why it is so?</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/not-executing-the-signal-handler-function/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
