MFC r368148: fix hastd(8)
hastd(8) assumes it has no extra file descriptors opened and aborts otherwise, so call closefrom() early.
PR: 227461