Lines Matching +full:exec +full:- +full:sh
6 # ./alarm.sh <function name>
8 # You can source this file and use the alarm-status function.
10 set -o nounset
11 set -o pipefail
12 set -o errexit
17 # alarm-status job_dir/STATUS 10 \
20 alarm-status() {
25 # NOTE: It would be nice to setpgrp() before exec? And then can the signal
26 # be delivered to the entire group, like kill -SIGALRM -PID?
29 perl -e 'alarm shift; exec @ARGV or die "ERROR: after exec @ARGV"' "$@"
32 set -o errexit
42 # --remove-bad-rows. A task can also be marked SKIPPED before running
43 # the child process (see backfill.sh).
46 # exit code 142 means SIGALARM. 128 + 14 = 142. See 'kill -l'.
62 echo $i - "$@"
86 mkdir -p _tmp
89 alarm-status _tmp/A 1 $0 _succeed foo
93 alarm-status _tmp/B 3 $0 _succeed bar
97 alarm-status _tmp/C 3 $0 _fail baz
101 alarm-status _tmp/D 3 $0 _skip baz
107 test-simple() {
108 alarm-status _tmp/status.txt 1 sleep 2
111 test-bad-command() {
112 alarm-status _tmp/status.txt 1 nonexistent_sleep 2
116 test-perl() {
118 perl -e 'alarm shift; exec @ARGV or die "ERROR after exec @ARGV"' 1 _sleep 2
122 if test $(basename $0) = 'alarm-lib.sh'; then