close file descriptors

this fixes a hang when starting multiple processes