<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sigcont on Major Hayden</title><link>https://major.io/tags/sigcont/</link><description>Recent content in Sigcont on Major Hayden</description><generator>Hugo</generator><language>en</language><managingEditor>major@mhtx.net (Major Hayden)</managingEditor><webMaster>major@mhtx.net (Major Hayden)</webMaster><copyright>All content licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)</copyright><lastBuildDate>Sun, 07 Jun 2026 23:39:03 +0000</lastBuildDate><atom:link href="https://major.io/tags/sigcont/index.xml" rel="self" type="application/rss+xml"/><item><title>Two great signals: SIGSTOP and SIGCONT</title><link>https://major.io/p/two-great-signals-sigstop-and-sigcont/</link><pubDate>Mon, 15 Jun 2009 18:16:19 +0000</pubDate><author>major@mhtx.net (Major Hayden)</author><guid>https://major.io/p/two-great-signals-sigstop-and-sigcont/</guid><description>&lt;p&gt;The best uses I&amp;rsquo;ve found for the SIGSTOP and SIGCONT signals are times when a process goes haywire, or when a script spawns too many processes at once.&lt;/p&gt;
&lt;p&gt;You can issue the signals like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;kill -SIGSTOP [pid]
kill -SIGCONT [pid]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Wikipedia has great definitions for &lt;a href="http://en.wikipedia.org/wiki/SIGSTOP"&gt;SIGSTOP&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When SIGSTOP is sent to a process, the usual behaviour is to pause that process in its current state. The process will only resume execution if it is sent the SIGCONT signal. SIGSTOP and SIGCONT are used for job control in the Unix shell, among other purposes. SIGSTOP cannot be caught or ignored.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and &lt;a href="http://en.wikipedia.org/wiki/SIGCONT"&gt;SIGCONT&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When SIGSTOP or SIGTSTP is sent to a process, the usual behaviour is to pause that process in its current state. The process will only resume execution if it is sent the SIGCONT signal. SIGSTOP and SIGCONT are used for job control in the Unix shell, among other purposes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In short, SIGSTOP tells a process to “hold on” and SIGCONT tells a process to “pick up where you left off”. This can work really well for rsync jobs since you can pause the job, clear up some space on the destination device, and then resume the job. The source rsync process just thinks that the destination rsync process is taking a long time to respond.&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;ps&lt;/code&gt; output, stopped processes will have a status containing &lt;em&gt;T&lt;/em&gt;. Here&amp;rsquo;s an example with &lt;code&gt;crond&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# kill -SIGSTOP `pgrep crond`
# ps aufx | grep crond
root 3499 0.0 0.0 100328 1236 ? Ts Jun11 0:01 crond
# kill -SIGCONT `pgrep crond`
# ps aufx | grep crond
root 3499 0.0 0.0 100328 1236 ? Ss Jun11 0:01 crond
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>