Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ get_filesystems () {
local region=$1
local pattern=$2

mkdir $tmpdir/$region
mkdir $tmpdir/$region > /dev/null 2>&1
local tmpdir=$tmpdir/$region

tmpout=$(mktemp -p $tmpdir list_fss-output.XXX)
Expand Down Expand Up @@ -381,10 +381,11 @@ done
while [ ${#pids[@]} -gt 0 ]; do
wait -n -p pid "${!pids[@]}"
if [ $? -ne 127 ]; then
cat $tmpdir/${pids[$pid]}.out
cat $tmpdir/${pids[$pid]}.out 2> /dev/null
unset pids[$pid]
else
echo "Error, waiting for an non-existent process. This should never happen." 1>&2
exit 1
# If this happens none of the PIDs are still running so somehow we missed one with the
# wait command. Regardless as to why or how, there is no reason to keep waiting.
exit 0
fi
done
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ start_watchdog () {
get_svms () {
region=$1

mkdir $tmpdir/$region
mkdir $tmpdir/$region > /dev/null 2>&1
local tmpdir=$tmpdir/$region
tmpout=$tmpdir/output
tmpout2=$tmpdir/output2
Expand Down Expand Up @@ -200,10 +200,10 @@ done
while [ ${#pids[@]} -gt 0 ]; do
wait -n -p pid "${!pids[@]}"
if [ $? -ne 127 ]; then
cat $tmpdir/${pids[$pid]}.out
cat $tmpdir/${pids[$pid]}.out 2> /dev/null
unset pids[$pid]
else
echo "Error, waiting for an non-existent process. This should never happen." 1>&2
exit 1
# If the wait command returns 127, then all processes are no longer running so exit.
exit 0
fi
done
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ start_watchdog () {
get_volumes () {
local region=$1

mkdir $tmpdir/$region
mkdir $tmpdir/$region > /dev/null 2>&1
local tmpdir=$tmpdir/$region

volumeList=$tmpdir/list_aws_vol-out
Expand Down Expand Up @@ -298,10 +298,10 @@ done
while [ ${#pids[@]} -gt 0 ]; do
wait -n -p pid "${!pids[@]}"
if [ $? -ne 127 ]; then
cat $tmpdir/${pids[$pid]}.out
cat $tmpdir/${pids[$pid]}.out 2> /dev/null
unset pids[$pid]
else
echo "Error, waiting for an non-existent process. This should never happen." 1>&2
exit 1
# If wait returns 127, it means there are no more child processes to wait for.
exit 0
fi
done
Loading