RSSAmplifier

zonename.org · Aug 30, 2013

Timeout in a Shell Script

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Although GNU coreutils includes a timeout command, sometimes that’s not available. There are a lot of ham fisted approaches by very intelligent people. The “right” way to do this is with the ALRM signal. That’s what it’s for. So rather than reinvent the wheel, here’s a correctly working timeout function. This works in at least bash and zsh . cleanup () { [[ -z…

Read on /2013/08/timeout-in-a-shell-script/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.