the process does not need cleaning up  the kill logic has been part of the script for a long time  however when we pull the tar pid to kill via tar proc pid  it is the pid that already exited  but hangs indefinitely until the return code is read  when we poll for the return code the process goes away and the pipe closes and the script exits and respawns under glance api retry logic  the kill logic still exists for edge cases where tar may be stuck for other reasons 