Unverified Commit 2a8ed106 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Refactor file handling logic

parent a69631ef
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -85,13 +85,16 @@ mKill() {

  for file in "${files[@]}"; do

    [ ! -s "$file" ] && continue
    if [ -s "$file" ]; then

      pid="$(<"$file")"

      while isAlive "$pid"; do
        sleep 0.2
      done

    fi

    rm -f "$file"
  done