exec 1>&- closed stdout but left stderr holding the tee pipe open, so tee never got EOF and wait blocked indefinitely — keeping the process alive and the locks held until manually killed.
exec 1>&- closed stdout but left stderr holding the tee pipe open, so tee never got EOF and wait blocked indefinitely — keeping the process alive and the locks held until manually killed.