closing all file descriptors before restart