Not logged in
Log in now
Create an account
Subscribe to LWN
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
O_TRUNC is used on the new file:
3.b) fd = open("~/.kde/foo/bar/baz.new", O_WRONLY|O_TRUNC|O_CREAT)
That's because the file by the same name (i.e. baz.new) may exist and contain random garbage, which is then removed by O_TRUNC.
> And don't recreate a file that isn't changing, for heaven's sakes!
Yeah, that's one of the key things. Don't touch what didn't change.
Garrett: ext4, application expectations and power management
Posted Mar 16, 2009 6:12 UTC (Mon) by flewellyn (subscriber, #5047)
Posted Mar 16, 2009 8:46 UTC (Mon) by gdt (subscriber, #6284)
Posted Mar 16, 2009 14:40 UTC (Mon) by flewellyn (subscriber, #5047)
Posted Mar 16, 2009 15:40 UTC (Mon) by cortana (subscriber, #24596)
You have to replicate *all* of the following!
* user and group owner
* XFS ACLs (it uses its own non-posix API I think)
* attributes (some of which only root may set)
* extended attributes (some of which only root may set, and some of which only root may read!)
* user extended attributes
* XML user extended attributes (again, it uses its own non-posix API)
* reiserfs extended attributes (again, I believe it uses its own non-posix API. And probably reiser3 and reiser4 use different APIs...)
And this is just for apps for Linux. If you want your program to run on Windows, Mac OS X, FreeBSD, etc. etc., you have an entirely different set of tasks to perform...
Posted Mar 17, 2009 12:13 UTC (Tue) by nye (guest, #51576)
Posted Mar 17, 2009 13:23 UTC (Tue) by cortana (subscriber, #24596)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds