<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Snooda]]></title> 
<link>http://www.snooda.com/index</link> 
<description><![CDATA[Snooda's Blog]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Snooda]]></copyright>
<item>
<link>http://www.snooda.com/read/</link>
<title><![CDATA[linux shell脚本信号处理：trap]]></title> 
<author>snooda &lt;admin@snooda.com&gt;</author>
<category><![CDATA[默认分类]]></category>
<pubDate>Tue, 18 Oct 2011 17:50:47 +0000</pubDate> 
<guid>http://www.snooda.com/read/</guid> 
<description>
<![CDATA[ 
	  之前一直以为shell脚本中没法处理信号，所以也没有探究过，突然发现是可以的。<br />
<br />
#!/bin/bash<br />
<br />
abc()&#123;<br />
    echo &quot;signal receive&quot;<br />
&#125;<br />
trap &#039;abc&#039; INT<br />
sleep 100<br />
<br />
   这个脚本会在收到ctrl+c的时候打印signal receive。<br />

]]>
</description>
</item><item>
<link>http://www.snooda.com/read/#blogcomment</link>
<title><![CDATA[[评论] linux shell脚本信号处理：trap]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.snooda.com/read/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>