Last active
August 4, 2024 10:08
-
-
Save andrewpetrochenkov/c8b8b38931a039db04d6ce901c0a5374 to your computer and use it in GitHub Desktop.
shell timeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } | |
timeout 1 sleep 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment