Hi, i found this on linux-pm. There is something to do for us... :-)
On Fri, Mar 24, 2006 at 08:13:48PM +0100, Stefan Rompf wrote: > Hi, > > recently I patched my 2.6.16 kernel to use uswsusp. Nice work, but when I > installed /usr/local/sbin/suspend into the Suse 9.3 powermanagement scripts, > I've stumbled over a bad interaction: powersaved closes all filedescriptors > before calling scripts. suspend then opens snapshot and swap device, > allocating file descriptors 0 and 1, but printfs() afterwards. Luckily, I did > not lose any data. So we should either open /dev/null for fd 0,1 and 2 before running scripts, or just pass them over from the daemon (they should be dup()ed to /dev/null already if running in daemon mode - if not it might actually be interesting to see some script output in the console. This might also explain some strange initscript failures when trying to stop services etc, this is why we have an explicit "> /dev/null 2>&1" in there. > For robustness, suspend must make sure that these fds are open. Simple patch > to achieve this is attached. It loses the descriptors, but I don't think > that's an issue for the short running program. Even if suspend is fixed, we probably still should do something in powersaved. -- Stefan Seyfried \ "I didn't want to write for pay. I QA / R&D Team Mobile Devices \ wanted to be paid for what I write." SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen _______________________________________________ powersave-devel mailing list [email protected] http://forge.novell.com/mailman/listinfo/powersave-devel
