Fixed close(2) to change status of a file descriptor to closed.