Close FDs on task termination