Close fileHandles for terminated process

Fixes https://github.com/symfony/symfony/issues/7078