Have you considered using a timeout to write changes 5 minutes after last modification in addition to on SIGTERM and SIGHUP?
I've found that's usually a good way to deal with unexpected program death without saving too often or explicitly asking the user when to save. On 13-02-10 05:38 AM, PCMan wrote: > > 3. There is no good way to save config file. Normally, we write the > config file on program termination. However, when logging out a > desktop session, the panel is KILLed via SIGKILL, not SIGTERM in some > window managers. That means, we don't have a chance to write the > config file to disk. It's a old problem existed in lxpanel. I want to > solve it in lxpanel2, but I haven't figure out a better way. Writing > the whole config file everytime a tiny config value is changed is > insane, but it's the only reliable way to get every config value > correctly written to disk. :-( > ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Lxde-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxde-list
