add: static Bool registeredSaveOnExit = False;
context: registerSaveOnExit(void){    if (!registeredSaveOnExit) {#ifndef HAVE_ATEXIT        on_exit(saveDefaultsChanges, (void*)NULL);#else        atexit(saveDefaultsChanges);#endif        registeredSaveOnExit = True;    }}