voids do not collapse until all processes leave
This commit is contained in:
parent
6931f58a73
commit
6888571eea
1 changed files with 11 additions and 0 deletions
|
@ -132,6 +132,17 @@ function mkvoid () {
|
|||
pushd "${__MKVOID_PATH}" > /dev/null || die "pushd"
|
||||
OVER_PROMPT_VOIDS="$OVER_PROMPT_VOIDS:$__MKVOID_NAME" zsh
|
||||
popd > /dev/null
|
||||
|
||||
while true; do
|
||||
fuser -s "${__MKVOID_PATH}"
|
||||
if [[ $? == 1 ]]; then
|
||||
break
|
||||
else
|
||||
echo -n ">>> Waiting for other processes to abandon this void.\r"
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
|
||||
rm -f "${__MKVOID_PATH}" || die "rm link"
|
||||
rm -rf "${__MKVOID_ID}" || die "rm void"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue