Skip to content

Instantly share code, notes, and snippets.

@zavakid
Created February 25, 2013 15:13
Show Gist options
  • Save zavakid/5030465 to your computer and use it in GitHub Desktop.
Save zavakid/5030465 to your computer and use it in GitHub Desktop.
exec a command with timeout
#/bin/bash
# 其实是使用了 perl 的 alarm
perl -e "alarm 10; exec @ARGV" "$@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment