Hide Forgot
I suspect that the documentation at [1] has an error in the second code snippet, the following line: open("/.kde/myconfig", O_WRONLY|O_TRUNC|O_CREAT); Instead of reading the configuration from source and only then writing the second one, the original file is truncated before reading from it. I suspect it should be changed to *read* from that file. [1] http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Power_Management_Guide/Developer_Tips-Fsync.html
Thanks for pointing this out, Jan. I've changed 'open' to 'read' in the second sample config file ready for the 6.3 version of the guide.
QE verified in version Red_Hat_Enterprise_Linux-Power_Management_Guide-6-en-US-1.0-13 [verified]
This bug is now fixed and available as part of the Red Hat Enterprise Linux 6.3 release on http://docs.redhat.com/. Setting to CLOSED > CURRENTRELEASE.