introduce SetCloseAllFds and minor cosmetic changes