diff options
Diffstat (limited to 'sup')
-rwxr-xr-x | sup | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/sh + +command="$*" + +cleanup() { + echo "killed... $pid" + kill $pid + exit +} + +trap cleanup 2 15 + +while :; do + echo -n "running... " + $command & + pid=$! + echo PID: $pid + wait $pid +done + |