<?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>The Daily Build &#187; news</title>
	<atom:link href="http://blog.bstpierre.org/category/news/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bstpierre.org</link>
	<description>Software Development, version 3.0</description>
	<lastBuildDate>Wed, 26 May 2010 16:08:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hassle Free Way to Kill Sudo&#8217;d Jobs</title>
		<link>http://blog.bstpierre.org/hassle-free-way-to-kill-sudod-jobs</link>
		<comments>http://blog.bstpierre.org/hassle-free-way-to-kill-sudod-jobs#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:45:28 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/?p=189</guid>
		<description><![CDATA[Every now and then I have to run a foreground job under sudo that doesn&#8217;t want to die when I hit ^C. Then it&#8217;s a hassle to ^Z, get the pid of the sudo job, and sudo kill that pid.
So I wrote a little script (or a template for scripts) that runs the sudo job [...]


Related posts:<ol><li><a href='http://blog.bstpierre.org/using-pythons-ctypes-to-make-system-calls' rel='bookmark' title='Permanent Link: Using Python&#8217;s ctypes to Call Into C Libraries'>Using Python&#8217;s ctypes to Call Into C Libraries</a> <small>The ctypes module makes loading and...</small></li><li><a href='http://blog.bstpierre.org/lenny-jaunty-packages' rel='bookmark' title='Permanent Link: Using Lenny to Build Jaunty Packages'>Using Lenny to Build Jaunty Packages</a> <small> &lt;shameless_plug&gt; I&#8217;m in the middle...</small></li><li><a href='http://blog.bstpierre.org/pid-file-race' rel='bookmark' title='Permanent Link: An Interesting pid File Race'>An Interesting pid File Race</a> <small> ISC&#8217;s dhcpd uses this code...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Every now and then I have to run a foreground job under sudo that doesn&#8217;t want to die when I hit ^C. Then it&#8217;s a hassle to ^Z, get the pid of the sudo job, and sudo kill that pid.</p>
<p>So I wrote a little script (or a template for scripts) that runs the sudo job in the background (but preserves stdout/stderr) and relies on bash to clean up the job when you ^C the script. Only gotcha with this is that you may have to retype your sudo password when you ^C if your authentication has timed out by the time you get around to killing it.</p>
<pre>#!/bin/bash

function cleanup()
{
    sudo kill $job_pid
    wait $job_pid
    exit 0
}

trap cleanup SIGTERM
trap cleanup SIGINT

sudo long_running_foreground_process &amp;
job_pid=$!
wait</pre>


<p>Related posts:<ol><li><a href='http://blog.bstpierre.org/using-pythons-ctypes-to-make-system-calls' rel='bookmark' title='Permanent Link: Using Python&#8217;s ctypes to Call Into C Libraries'>Using Python&#8217;s ctypes to Call Into C Libraries</a> <small>The ctypes module makes loading and...</small></li><li><a href='http://blog.bstpierre.org/lenny-jaunty-packages' rel='bookmark' title='Permanent Link: Using Lenny to Build Jaunty Packages'>Using Lenny to Build Jaunty Packages</a> <small> &lt;shameless_plug&gt; I&#8217;m in the middle...</small></li><li><a href='http://blog.bstpierre.org/pid-file-race' rel='bookmark' title='Permanent Link: An Interesting pid File Race'>An Interesting pid File Race</a> <small> ISC&#8217;s dhcpd uses this code...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/hassle-free-way-to-kill-sudod-jobs/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox Quick Search for Google Maps</title>
		<link>http://blog.bstpierre.org/firefox-quick-search-for-google-maps</link>
		<comments>http://blog.bstpierre.org/firefox-quick-search-for-google-maps#comments</comments>
		<pubDate>Wed, 18 Feb 2009 13:43:19 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/firefox-quick-search-for-google-maps</guid>
		<description><![CDATA[I recently found myself wanting to quickly figure out how far (both miles and driving time) it is to various destinations. At first I was keeping a Firefox tab open to Google Maps and kept keying in the address for the destination. Then I realized that I could make a &#8220;Quick Search&#8221; and get the [...]


Related posts:<ol><li><a href='http://blog.bstpierre.org/pid-file-race' rel='bookmark' title='Permanent Link: An Interesting pid File Race'>An Interesting pid File Race</a> <small> ISC&#8217;s dhcpd uses this code...</small></li><li><a href='http://blog.bstpierre.org/using-pythons-ctypes-to-make-system-calls' rel='bookmark' title='Permanent Link: Using Python&#8217;s ctypes to Call Into C Libraries'>Using Python&#8217;s ctypes to Call Into C Libraries</a> <small>The ctypes module makes loading and...</small></li><li><a href='http://blog.bstpierre.org/zsh-prompt' rel='bookmark' title='Permanent Link: Set Your zsh Prompt'>Set Your zsh Prompt</a> <small>Since the beginning of time, all...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I recently found myself wanting to quickly figure out how far (both miles and driving time) it is to various destinations. At first I was keeping a Firefox tab open to Google Maps and kept keying in the address for the destination. Then I realized that I could make a &#8220;Quick Search&#8221; and get the info faster. Add this link to your Quick Searches folder:</p>
<p>http://maps.google.com/maps?f=d&amp;saddr=Elm+St,+ Manchester,+NH+03101&amp;daddr=%s&amp;output=html</p>
<p>[Formatted here for readability. Put it all on one line with no spaces.]</p>
<p>Edit the properties so that the &#8220;saddr=&#8221; part is your start address. Change the keyword to &#8220;gm&#8221;. This is set to only output simple HTML (no map). If you want the full map, remove the &amp;output=html on the end.</p>
<p>Now, when you need to get a quick idea of how long it is going to take you to get somewhere, open a new tab and type &#8220;gm city, state&#8221;.</p>


<p>Related posts:<ol><li><a href='http://blog.bstpierre.org/pid-file-race' rel='bookmark' title='Permanent Link: An Interesting pid File Race'>An Interesting pid File Race</a> <small> ISC&#8217;s dhcpd uses this code...</small></li><li><a href='http://blog.bstpierre.org/using-pythons-ctypes-to-make-system-calls' rel='bookmark' title='Permanent Link: Using Python&#8217;s ctypes to Call Into C Libraries'>Using Python&#8217;s ctypes to Call Into C Libraries</a> <small>The ctypes module makes loading and...</small></li><li><a href='http://blog.bstpierre.org/zsh-prompt' rel='bookmark' title='Permanent Link: Set Your zsh Prompt'>Set Your zsh Prompt</a> <small>Since the beginning of time, all...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/firefox-quick-search-for-google-maps/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrated to WordPress</title>
		<link>http://blog.bstpierre.org/migrated-to-wordpress</link>
		<comments>http://blog.bstpierre.org/migrated-to-wordpress#comments</comments>
		<pubDate>Sun, 04 Jan 2009 03:43:46 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/?p=16</guid>
		<description><![CDATA[Just switched from Blogger to WordPress. Several links are broken (I will fix these soon), and it looks like subscribers are probably going to see a bunch of duplicate posts. Sorry about that&#8230;


Related posts:How to Tell SSH Who You Are Do you log in to several...Use Local SSH Forwarding to Reduce the Number of Manual [...]


Related posts:<ol><li><a href='http://blog.bstpierre.org/configure-ssh-username' rel='bookmark' title='Permanent Link: How to Tell SSH Who You Are'>How to Tell SSH Who You Are</a> <small>Do you log in to several...</small></li><li><a href='http://blog.bstpierre.org/local-ssh-forwarding' rel='bookmark' title='Permanent Link: Use Local SSH Forwarding to Reduce the Number of Manual Hops'>Use Local SSH Forwarding to Reduce the Number of Manual Hops</a> <small>Local port forwarding is the same...</small></li><li><a href='http://blog.bstpierre.org/insist-on-tests' rel='bookmark' title='Permanent Link: Insist on Automatic Tests'>Insist on Automatic Tests</a> <small> At some point your team...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Just switched from Blogger to WordPress. Several links are broken (I will fix these soon), and it looks like subscribers are probably going to see a bunch of duplicate posts. Sorry about that&#8230;</p>


<p>Related posts:<ol><li><a href='http://blog.bstpierre.org/configure-ssh-username' rel='bookmark' title='Permanent Link: How to Tell SSH Who You Are'>How to Tell SSH Who You Are</a> <small>Do you log in to several...</small></li><li><a href='http://blog.bstpierre.org/local-ssh-forwarding' rel='bookmark' title='Permanent Link: Use Local SSH Forwarding to Reduce the Number of Manual Hops'>Use Local SSH Forwarding to Reduce the Number of Manual Hops</a> <small>Local port forwarding is the same...</small></li><li><a href='http://blog.bstpierre.org/insist-on-tests' rel='bookmark' title='Permanent Link: Insist on Automatic Tests'>Insist on Automatic Tests</a> <small> At some point your team...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/migrated-to-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
