Implement handling of all Close On Exit modes. Default is to close