-
-
Save lox/045a4b56a0c1e1c815fd011657c34b46 to your computer and use it in GitHub Desktop.
Testing spawning long running processes in bash
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
steps: | |
- label: ":llama:" | |
command: bash tick.sh | |
plugins: | |
- docker#v3.2.0: | |
image: "ubuntu:18.04" | |
debug: true | |
init: true |
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
#!/bin/bash | |
trap 'echo "Got an INT signal"' INT | |
trap 'echo "Got a TERM signal"' TERM | |
trap 'echo "Got a QUIT signal"' QUIT | |
trap 'script is finishing' EXIT | |
for ((i=0; i<1000; i++)); do | |
printf "tick: %d\n" "$i" | |
sleep 1 || true | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment