removing the atexit malarky and letting the operating system do its job