The close(2) interface closes a device and dismantles the associated Stream when the last open reference to the Stream closed. The exit(2) interface terminates the user process, and closes all open files.