diff --git a/compiler/dspash/worker.sh b/compiler/dspash/worker.sh index 6349a3e30..a94285a37 100644 --- a/compiler/dspash/worker.sh +++ b/compiler/dspash/worker.sh @@ -20,7 +20,7 @@ source "$PASH_TOP/compiler/pash_init_setup.sh" "$@" --distributed_exec export PASH_TMP_PREFIX="$(mktemp -d /tmp/pash_XXXXXXX)/" -function cleanup() { +cleanup() { kill "$FILEREADER_PID" "$DISCOVERY_PID" wait "$FILEREADER_PID" "$DISCOVERY_PID" 2>/dev/null rm -rf "$PASH_TMP_PREFIX" diff --git a/compiler/pash_runtime_quick_abort.sh b/compiler/pash_runtime_quick_abort.sh index cb4f0dc54..b3b541b83 100644 --- a/compiler/pash_runtime_quick_abort.sh +++ b/compiler/pash_runtime_quick_abort.sh @@ -15,7 +15,7 @@ log() # Taken from: https://stackoverflow.com/a/20473191 # list_include_item "10 11 12" "2" -function list_include_item { +list_include_item() { local list="$1" local item="$2" if [[ $list =~ (^|[[:space:]])"$item"($|[[:space:]]) ]] ; then diff --git a/evaluation/osdi22-eval/run_all.sh b/evaluation/osdi22-eval/run_all.sh index 1f694644d..d6d26f032 100755 --- a/evaluation/osdi22-eval/run_all.sh +++ b/evaluation/osdi22-eval/run_all.sh @@ -59,7 +59,7 @@ run_bench() { done } -function run_all_benchmarks() { +run_all_benchmarks() { # generate output folder for each run export RES_FOLDER=$1 # clean previous runs diff --git a/evaluation/other/circular/sq.sh b/evaluation/other/circular/sq.sh index 89520e695..bce2a72cd 100755 --- a/evaluation/other/circular/sq.sh +++ b/evaluation/other/circular/sq.sh @@ -2,6 +2,7 @@ # Clever trick that uses the /dev/fd/xx pseudo-file system # https://stackoverflow.com/questions/40244/how-to-make-a-pipe-loop-in-bash +# MMG 2022-06-30 the `function` kw is a bash-ism; leaving it in to not disrupt what gets optimized in previous evaluations function calc() { # calculate sum of squares of numbers 0,..,10 diff --git a/pa.sh b/pa.sh index 50ab34632..d031d737e 100755 --- a/pa.sh +++ b/pa.sh @@ -8,7 +8,7 @@ export PYTHONPATH=${PASH_TOP}/python_pkgs/ trap kill_all SIGTERM SIGINT ## kill all the pending processes that are spawned by this shell -function kill_all() { +kill_all() { # kill all my subprocesses only kill -s SIGKILL 0 # kill pash_daemon