Running a shell script with a timeout

In my line of work, deadlock is always close at hand. Running multithreaded programs through prototype compilers, runtime systems, or simulators (and sometimes all three!), there is always the chance that a bug will trigger a deadlock in some layer of the system. There’s nothing like setting off a bunch of experiments, going to sleep, and waking up the next morning to find that the first experiment (or, inevitably, the experiment that ran right after I stopped checking on things) deadlocked and prevented everything else from running. After being burned by this particular variant of Murphy’s Law countless times, I learned to always run benchmarks with a hard timeout. Knowing that my experiments won’t hang forever is honestly right up there with fancy foam mattresses in terms of helping me sleep at night. Continue reading

Advertisements

thunderbird to (hosted) gmail

My school (UW) recently allowed students to switch their school email accounts over to one of 2 providers: Google (via gmail) or Microsoft (via Outlook Web Access).  Feeling the inexorable pull of the cloud, I decided to take the plunge and switch to gmail, but one thing held me back.  I have used Thunderbird for a few years now and have accumulated roughly 1GB of archived messages that are generally unimportant but occasionally vital.  I’ve also espoused Lifehacker’s Trusted Trio email organization system and so many of the emails in my archive are tagged for easier organization.

I’d like to have this email archive searchable from gmail.  And I would really like to have all those tags I’ve accumulated over the years show up as gmail “labels”.  Fortunately, this isn’t too difficult thanks to the following: Continue reading