> perhaps a linked list would make sense, but atexits(2) doesn't say which order > the functions will be run in. and it doesn't seem like a great idea to > depend on > atexits running things in a particular order.
POSIX says they must be called in reverse order.